Commit 9aafb081 authored by Tommy Duc Luu's avatar Tommy Duc Luu
Browse files
parents 3be7cbf6 d1d867ca
import copy
import math
from tqdm import trange
import multiprocessing as mp
import numpy as np
import torch
......@@ -226,21 +225,4 @@ class ES:
self.writer.add_scalar("growth_loss/200", growth_loss[1], iteration)
save_image(torch.cat(pics, dim=0), '%s/pic/big%04d.png' % (self.logdir, iteration), nrow=1, padding=0)
save_model(self.net, self.logdir + "/models/model_" + str(iteration))
# if mean_fit > -0.003:
# logging.info("Training goal reached, exiting")
# break
def generate_graphic(self):
model = self.net
x_eval = tt(np.repeat(self.seed[None, ...], self.batch_size, 0))
pics = []
pics.append(to_rgb(x_eval).permute(0, 3, 1, 2))
for eval in range(40):
x_eval = model(x_eval)
if eval in [10, 20, 30, 39]: # frames to save img of
pics.append(to_rgb(x_eval).permute(0, 3, 1, 2))
save_image(torch.cat(pics, dim=0), '%s/graphic.png' % (self.logdir), nrow=len(pics), padding=0)
\ No newline at end of file
......@@ -2,7 +2,7 @@ INFO:root:
Arguments:
img: '🥕'
size: 15
logdir: 'interactive_CA/logs/15-ADAM-CARROT_08-05-2022_11-06-44'
logdir: 'interactive_CA/logs/15-ADAM-CARROT_08-05-2022_16-52-40'
load_model_path: 'final_models\\Adam\\NonSamplePools\\15-CARROT-train_05-05-2022_17-31-03\\models\\model_19500.pt'
n_channels: 16
hidden_size: 32
......
......@@ -2,7 +2,7 @@ INFO:root:
Arguments:
img: '🥕'
size: 15
logdir: 'interactive_CA/logs/15-ES-CARROT_08-05-2022_12-30-22'
logdir: 'interactive_CA/logs/15-ES-CARROT_08-05-2022_16-55-05'
load_model_path: 'final_models\\ES\\NonSamplePools\\15-CARROT-train_06-05-2022_11-06-58\\models\\model_1999000'
n_channels: 16
hidden_size: 32
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment