Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Questions about some lines #4

Open
wolfrosnet opened this issue Aug 3, 2023 · 2 comments
Open

Questions about some lines #4

wolfrosnet opened this issue Aug 3, 2023 · 2 comments

Comments

@wolfrosnet
Copy link

In 'run_func_OCD.py', I noticed that the backbone model(loaded at lines 88~90) is not set to eval mode. Could you explain the reason for this?

Additionally, at lines 134~135, the trained diffusion model and scale model are loaded but are not set to eval mode. I am wondering why this is the case.

I attempted to run the code for reproduction purposes, but unfortunately, the results were not satisfactory. Specifically, the diffusion loss(test phase, line 173) for MNIST(LeNet5), exceeded 30.

However, after setting the backbone model to eval mode, I was able to get correct results.

This makes me think that not setting the backbone model to eval mode might have some influence on the training process of the diffusion model and the baseline accuracy during the test phase. The baseline accuracy(loss) varies with each test.

If there's something I'm misunderstanding about the code, I'd appreciate a brief explanation.

@ShaharLutatiPersonal
Copy link
Owner

What torch version you have?
This is interesting phenomena, I will check whether it should be in eval mode for newer versions of torch. Thank you for your input.

@wolfrosnet
Copy link
Author

The versions of the packages I'm using are as follows:

imageio==2.23.1
matplotlib=3.7.2
numpy==1.24.1
opencv_python==4.8.0.74
PyYAML==6.0
torch==2.0.1+cu118
torchvision==0.15.2+cu118
tqdm==4.65.0

Thank you very much for your quick response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants