Closed Lishunkai closed 6 years ago
Hi, I'm not sure what is the problem without additional information. I reran the script scripts/generate.py
in Ubuntu 16.04 with up-to-date libraries and it works out-of-the-box for me.
I have downloaded the pre-trained model, and execute: CUDA_VISIBLE_DEVICES=0 python scripts/generate.py --input_dir data/bair \ --dataset_hparams sequence_length=30 \ --checkpoint pretrained_models/bair_action_free/ours_savp \ --mode test \ --results_dir results_test_samples/bair_action_free
The error information is:
Traceback (most recent call last):
File "scripts/generate.py", line 20, in
line 20 in generate.py is: from video_prediction import datasets, models
I think the possible reason is that python cannot recognize video_prediction, so it cannot import datasets and models. How to fix this bug?
I have fixed this bug. It turns out that it works well if I run this command in Pycharm IDE, but the problems will occur if I run in terminal.
This issue turned out to happen with python >= 3.6 due to a change on how imports are handled. For future reference, the fix is to add the repo's root directory to the PYTHONPATH
, e.g. export PYTHONPATH=path/to/video_prediction
.
Hello,
CUDA_VISIBLE_DEVICES=0 python scripts/generate.py --input_dir data/bair \ --dataset_hparams sequence_length=30 \ --checkpoint pretrained_models/bair_action_free/ours_savp \ --mode test \ --results_dir results_test_samples/bair_action_free
Then error occurs: ModuleNotFoundError: no module named 'video_prediction'.
It seems everything is right, but how does it happen? and how to fix this bug?
Thank you.