Skip to content

Commit

Permalink
torch_dreams: dreamer: deepcopy image_param
Browse files Browse the repository at this point in the history
  • Loading branch information
Mayukhdeb committed Mar 28, 2021
1 parent 03d9308 commit 70b9c09
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions torch_dreams/dreamer.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import torch
from tqdm import tqdm
from copy import deepcopy
import torchvision.transforms as transforms
from .dreamer_utils import Hook, default_func_mean

Expand Down Expand Up @@ -68,8 +69,8 @@ def render(self, layers, image_parameter = None, width= 256, height = 256, iter

image_parameter = auto_image_param(height= height, width = width, device = self.device, standard_deviation = 0.01)
else:
image_parameter = image_parameter.copy()
image_parameter = deepcopy(image_parameter)

if image_parameter.optimizer is None:
image_parameter.get_optimizer(lr = lr, weight_decay = weight_decay)

Expand Down

0 comments on commit 70b9c09

Please sign in to comment.