johannbrehmer / manifold-flow

Manifold-learning flows (ℳ-flows)
https://arxiv.org/abs/2003.13913
MIT License
230 stars 27 forks source link

Alternating Training #10

Closed hmdolatabadi closed 4 years ago

hmdolatabadi commented 4 years ago

Hi!

It seems there's a problem with the alternating training of the code on repo. Upon trying to train using this option, you'd get an error saying:

Traceback (most recent call last):
  File "C:/M-Flows/experiments/train.py", line 503, in <module>
    learning_curves = train_model(args, dataset, model, simulator)
  File "C:/M-Flows/experiments/train.py", line 433, in train_model
    learning_curves = train_manifold_flow_alternating(args, dataset, model, simulator)
  File "C:/M-Flows/experiments/train.py", line 230, in train_manifold_flow_alternating
    **meta_kwargs,
  File "C:\M-Flows\experiments\training\alternate.py", line 159, in train
    **trainer_kwargs_
  File "C:\M-Flows\experiments\training\trainer.py", line 456, in partial_epoch
    batch_data, loss_functions, loss_weights, optimizer, clip_gradient, forward_kwargs=forward_kwargs, custom_kwargs=custom_kwargs
TypeError: batch_train() missing 1 required positional argument: 'parameters'

I tried to get rid of this problem by adding the parameters in AlternateTrainer to the partial_epoch, but it raises another error. Could you please tell me how should I correct this?

Thanks.

johannbrehmer commented 4 years ago

Thank you for reporting this! I'll try to get to this as soon as possible. Unfortunately, it may take me a few days until I get to it – sorry for the delay.

johannbrehmer commented 4 years ago

Hi, thanks again for spotting this. I believe I found the bug and fixed it (both on the public and master branches). At least it's now running on my machine.

Could you check if it works for you now?

Sorry for the trouble, Johann

hmdolatabadi commented 4 years ago

Dear Johann,

Thanks for your help. Yeah, it seems to be working now. However, other bugs in your "circle.ipynb" notebook may arise due to this change. I have somehow found a workaround, but I would love to also have your solution to this.

Sincerely, Hadi.

johannbrehmer commented 4 years ago

Hi Hadi,

thanks for finding yet another bug! I hope d14d6a0b9ed429eb38025661a721403f98f14967 fixed it.

Cheers, Johann