alexlee-gk / video_prediction

Stochastic Adversarial Video Prediction
https://alexlee-gk.github.io/video_prediction/
MIT License
303 stars 65 forks source link

ValueError: Invalid model savp #5

Closed chetankm1992 closed 6 years ago

chetankm1992 commented 6 years ago

Hi, I am trying to run your code by following your instructions but there are some issues. 1) First one was that "no module named datasets and models" so I added a code snippet wherever it was required, that is: import sys, os sys.path.append('/home/chetan/Desktop/video_prediction/video_prediction') and it is working now. 2) Then, I am getting another error that Traceback (most recent call last): File "scripts/generate.py", line 184, in main() File "scripts/generate.py", line 114, in main VideoPredictionModel = models.get_model_class(args.model) File "/home/chetan/Desktop/video_prediction/video_prediction/models/init.py", line 33, in get_model_class raise ValueError('Invalid model %s' % model) ValueError: Invalid model savp

I tried to solve this issue but I am unable to do so. Can you please suggest me what should I do. Thank you.

chetankm1992 commented 6 years ago

I commented below if condition in video_prediction/video_prediction/models/init.py file and the code is working fine. I don't know is it a good solution or not but for now things are working.

if model_class is None or not issubclass(model_class, BaseVideoPredictionModel):

#    raise ValueError('Invalid model %s' % model)
alexlee-gk commented 6 years ago
  1. The python scripts should be run from the root directory or the root video_prediction directory should be added to the PYTHONPATH.
  2. I don't see why it would throw that error since 'savp' is a valid model. Is there any reason that file is named init.py instead of __init__.py?
chetankm1992 commented 6 years ago

Thank you for your reply.

  1. I was running the given script from root folder i.e, video_prediction but it was showing "no module named video_prediction" so I just added using sys.path.append, wherever it was required and now this error is resolved. By the way I tried adding directory using PYTHONPATH as you mentioned but still I am getting error, so I will stay with my earlier solution.
  2. File name is __init__.py, but due to github auto text updating it was turned to init.py. I am getting "savp" error, I don't know why but as I mentioned when I commented if condition, code seems to be working and generating results but I am confused what is the prediction part and the ground truth part. So, I am just trying to figure it out. Any suggestions for savp error and results understanding will be helpful.
alexlee-gk commented 6 years ago

I can't tell what the issue is without any further information.

As for the results, the naming convention is that "images" and "gen_images" correspond to ground-truth and predicted videos, respectively.

alexlee-gk commented 6 years ago

Closing this for now. Feel free to re-open if you'd like to provide further details.