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

DomainCallback throws an error #5

Open
alinadubatovka opened this issue May 21, 2022 · 2 comments
Open

DomainCallback throws an error #5

alinadubatovka opened this issue May 21, 2022 · 2 comments

Comments

@alinadubatovka
Copy link
Collaborator

from Model.DomainAdaptation.domain_adaptation_callback import DomainCallback

Traceback (most recent call last):
File "SimulationExperiments/digits5/digits_5_classification.py", line 484, in run_experiment
digits_classification(**experiment)
File "SimulationExperiments/digits5/digits_5_classification.py", line 247, in digits_classification
hist = model.fit(x=x_source_tr, y=y_source_tr, epochs=1, verbose=2,
File "/cluster/project/jbuhmann/alinadu/miniconda3/envs/gdu4dg/lib/python3.8/site-packages/keras/engine/training.py", line 1230, in fit
callbacks.on_epoch_end(epoch, epoch_logs)
File "/cluster/project/jbuhmann/alinadu/miniconda3/envs/gdu4dg/lib/python3.8/site-packages/keras/callbacks.py", line 413, in on_epoch_end
callback.on_epoch_end(epoch, logs)
File "/cluster/project/jbuhmann/alinadu/pub-gdu4dg/Model/DomainAdaptation/domain_adaptation_callback.py", line 68, in on_epoch_end
domain_train_prob = self.domain_layer.get_domain_prob(train_features).numpy()
AttributeError: 'NoneType' object has no attribute 'get_domain_prob'

@alinadubatovka
Copy link
Collaborator Author

alinadubatovka commented May 23, 2022

I believe that this if should be un-indented and placed outside of the except codeblock and it should stop the execution otherwise the error above occurs when the get_domain_prob method is called from None

Also, I don't understand which exception is thrown inside the try block above...

@sfsouthpalatinate
Copy link
Member

The issue occurs only with TF 2.7.0. I downgraded TF to 2.4.1, as stated in the requirements, I don't get this error.

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