Closed cclough closed 5 years ago
Hi,
Glad you find the repo useful.
A quick workaround for the latter case is to change line 96-97 in disvae/training.py
:
for epoch in range(epochs):
....
if self.gif_visualizer is not None:
self.gif_visualizer.save_reset()
to
for epoch in range(epochs):
....
if self.gif_visualizer is not None:
self.gif_visualizer.save()
if self.gif_visualizer is not None:
self.gif_visualizer.reset()
which basically saves the whole gif at every epoch. Do you want this feature in order to have the gif in case you exit the training with ctrl-c or to check how what the model is learning while training?
main.py
add: save_metadata(vars(args), exp_dir)
where save_metadata
is improted from modelIO. I.e. line 10 of main.py
should be from disvae.utils.modelIO import save_model, load_model, load_metadata,save_metadata
.Let me know if it works, and if others show interests in those features i'll add them in the repo.
Hope that helps.
Apologies if the following are just me not configuring properly:
I'm not seeing Gifs/Pngs being created in the model directory with e.g.
python main.py factor_celeba_cc -x factor_celeba -d celeba -l factor
. I'd love to have these created every epochwhen i try to evaluate after stopping a training run I get
ization.py", line 382, in load f = open(f, 'rb') FileNotFoundError: [Errno 2] No such file or directory: 'results/best_celeba/model.pt'
To work around I then rename the e.g. model-100.pt in the model directory to model.pt, then I get21:50:09 INFO - main: Root directory for saving and loading experiments: results/ best_celeba Traceback (most recent call last): File "main.py", line 252, in <module> main(args) File "main.py", line 233, in main test_loader = get_dataloaders(metadata["dataset"], KeyError: 'dataset'
Incidently when i run e.g.
python main_viz.py best_celeba gif-traversals reconstruct-traverse -c 7 -r 6 -t 2 --is-posterior
I get the sameKerError: 'dataset'
errorThanks for the fantastic repo though!