VICO-UoE / URL

Universal Representation Learning from Multiple Domains for Few-shot Classification - ICCV 2021, Cross-domain Few-shot Learning with Task-specific Adapters - CVPR 2022
MIT License
126 stars 17 forks source link

Error in testing phase #5

Closed chmxu closed 2 years ago

chmxu commented 2 years ago

Hi, thanks for your code! When I try to run test_extractor_pa.py after installing meta-dataset, I get the following error in L61. *** RuntimeError: The Session graph is empty. Add operations to the graph before calling run().

I'm using tensorflow 2.8.0, pytorch 1.9.0 and cuda 11.1. I wonder if you can help me on this problem. Thank you!

chmxu commented 2 years ago

Adding tf.compat.v1.disable_eager_execution() to the beginning of main() solves this error but I don't know if this is appropriate.

WeiHongLee commented 2 years ago

Hi, we were using tensorflow 1.15.0 with cuda 10.1 and I think this error is probably caused by using higher version of tensorflow. Did you get similar results in your setting? Or you can lower the tensorflow version. This should work.

chmxu commented 2 years ago

Yes I can reproduce the result. Thank you!