Maluuba / GeNeVA

Code to train and evaluate the GeNeVA-GAN model for the GeNeVA task proposed in our ICCV 2019 paper "Tell, Draw, and Repeat: Generating and modifying images based on continual linguistic instruction"

Home Page:https://www.microsoft.com/en-us/research/project/generative-neural-visual-artist-geneva/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AttributeError: 'NoneType' object has no attribute 'seek'.

VicZlq opened this issue · comments

commented

Hello! Thank you very much for your wonderful work!
When I reproduced the code, some problems occurred:
First of all, I can't seem to generate the corresponding h5 file on the CoDraw data set. Do you have a classified data connection?
Then, when I tested the model, some problems appeared:
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "geneva/inference/test.py", line 64, in
tester = Tester(cfg, test_eval=True)
File "geneva/inference/test.py", line 31, in init
self.model.load(model_path, iteration)
File "/home/zhaoliuqing/GeNeVA/geneva/models/inference_models/recurrent_gan.py", line 111, in load
snapshot = _read_weights(pre_trained_path, iteration)
File "/home/zhaoliuqing/GeNeVA/geneva/models/inference_models/recurrent_gan.py", line 148, in _read_weights
snapshot = torch.load(pre_trained_path)
File "/home/zhaoliuqing/anaconda3/envs/geneva/lib/python3.6/site-packages/torch/serialization.py", line 358, in load
return _load(f, map_location, pickle_module)
File "/home/zhaoliuqing/anaconda3/envs/geneva/lib/python3.6/site-packages/torch/serialization.py", line 520, in _load
_check_seekable(f)
File "/home/zhaoliuqing/anaconda3/envs/geneva/lib/python3.6/site-packages/torch/serialization.py", line 179, in _check_seekable
raise_err_msg(["seek", "tell"], e)
File "/home/zhaoliuqing/anaconda3/envs/geneva/lib/python3.6/site-packages/torch/serialization.py", line 172, in raise_err_msg
raise type(e)(msg)
AttributeError: 'NoneType' object has no attribute 'seek'. You can only torch.load from a file that is seekable. Please pre-load the data into a buffer like io.BytesIO and try to load from it instead.
Have you ever encountered a similar problem? Thank you!