I am running this code on the Mac-book-air. During the execution of the following command
python test.py --gpu_ids -1 --input_path sample_dataset/imgs/N_000000.jpg
I am getting the following error message.
I am a beginner in Python and Mac both. Please help me.
------------ Options -------------
aus_file: aus_openface.pkl
batch_size: 4
checkpoints_dir: ./checkpoints
cond_nc: 17
data_dir: None
dataset_mode: aus
do_saturate_mask: False
gpu_ids: []
image_size: 128
images_folder: imgs
input_path: sample_dataset/imgs/N_000000.jpg
is_train: False
load_epoch: 0
model: ganimation
n_threads_test: 1
name: experiment_1
(GANimation) Mayanks-Air:GANimation mayanktiwari$ python test.py --gpu_ids -1 --input_path sample_dataset/imgs/N_000000.jpg
------------ Options -------------
aus_file: aus_openface.pkl
batch_size: 4
checkpoints_dir: ./checkpoints
cond_nc: 17
data_dir: None
dataset_mode: aus
do_saturate_mask: False
gpu_ids: []
image_size: 128
images_folder: imgs
input_path: sample_dataset/imgs/N_000000.jpg
is_train: False
load_epoch: 0
model: ganimation
n_threads_test: 1
name: experiment_1
output_dir: ./output
serial_batches: False
test_ids_file: test_ids.csv
train_ids_file: train_ids.csv
-------------- End ----------------
./checkpoints/experiment_1
Network generator_wasserstein_gan was created
Traceback (most recent call last):
File "test.py", line 74, in
main()
File "test.py", line 65, in main
morph = MorphFacesInTheWild(opt)
File "test.py", line 19, in init
(GANimation) Mayanks-Air:GANimation mayanktiwari$ python test.py --gpu_ids -1 --input_path sample_dataset/imgs/N_000000.jpg
------------ Options -------------
aus_file: aus_openface.pkl
batch_size: 4
checkpoints_dir: ./checkpoints
cond_nc: 17
data_dir: None
dataset_mode: aus
do_saturate_mask: False
gpu_ids: []
image_size: 128
images_folder: imgs
input_path: sample_dataset/imgs/N_000000.jpg
is_train: False
load_epoch: 0
model: ganimation
n_threads_test: 1
name: experiment_1
output_dir: ./output
serial_batches: False
test_ids_file: test_ids.csv
train_ids_file: train_ids.csv
-------------- End ----------------
./checkpoints/experiment_1
Network generator_wasserstein_gan was created
Traceback (most recent call last):
File "test.py", line 74, in
main()
File "test.py", line 65, in main
morph = MorphFacesInTheWild(opt)
File "test.py", line 19, in init
self._model = ModelsFactory.get_by_name(self._opt.model, self._opt)
File "/Users/mayanktiwari/PycharmProjects/GANimation/models/models.py", line 15, in get_by_name
model = GANimation(*args, **kwargs)
File "/Users/mayanktiwari/PycharmProjects/GANimation/models/ganimation.py", line 18, in init
self._init_create_networks()
File "/Users/mayanktiwari/PycharmProjects/GANimation/models/ganimation.py", line 40, in _init_create_networks
self._G.cuda()
File "/Users/mayanktiwari/.virtualenvs/GANimation/lib/python3.7/site-packages/torch/nn/modules/module.py", line 260, in cuda
return self._apply(lambda t: t.cuda(device))
File "/Users/mayanktiwari/.virtualenvs/GANimation/lib/python3.7/site-packages/torch/nn/modules/module.py", line 187, in _apply
module._apply(fn)
File "/Users/mayanktiwari/.virtualenvs/GANimation/lib/python3.7/site-packages/torch/nn/modules/module.py", line 187, in _apply
module._apply(fn)
File "/Users/mayanktiwari/.virtualenvs/GANimation/lib/python3.7/site-packages/torch/nn/modules/module.py", line 193, in _apply
param.data = fn(param.data)
File "/Users/mayanktiwari/.virtualenvs/GANimation/lib/python3.7/site-packages/torch/nn/modules/module.py", line 260, in
return self._apply(lambda t: t.cuda(device))
File "/Users/mayanktiwari/.virtualenvs/GANimation/lib/python3.7/site-packages/torch/cuda/init.py", line 160, in _lazy_init
_check_driver()
File "/Users/mayanktiwari/.virtualenvs/GANimation/lib/python3.7/site-packages/torch/cuda/init.py", line 74, in _check_driver
raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled