Closed ding-hai closed 6 years ago
It looks like flownet2 wasn't compiled successfully. Please refer to https://github.com/NVIDIA/flownet2-pytorch/issues to see if there are similar issues.
I use the python36 branch of https://github.com/NVIDIA/flownet2-pytorch ,and the error was solved . But the new one is occurs below:
root@9b2241734e98:/vid2vid# python3 test.py --name label2city_2048 --loadSize 2048 --n_scales_spatial 3 --use_instance --fg --use_single_G
/usr/lib/python3.5/importlib/_bootstrap.py:222: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
return f(*args, **kwds)
/usr/lib/python3.5/importlib/_bootstrap.py:222: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
return f(*args, **kwds)
------------ Options -------------
aspect_ratio: 1.0
batchSize: 1
checkpoints_dir: ./checkpoints
dataroot: datasets/Cityscapes/
dataset_mode: temporal
debug: False
display_id: 0
display_winsize: 512
feat_num: 3
fg: True
fg_labels: [26]
fineSize: 512
gpu_ids: [0]
how_many: 300
input_nc: 3
isTrain: False
label_feat: False
label_nc: 35
loadSize: 2048
load_features: False
load_pretrain:
max_dataset_size: inf
model: vid2vid
nThreads: 2
n_blocks: 9
n_blocks_local: 3
n_downsample_E: 3
n_downsample_G: 3
n_frames_G: 3
n_gpus_gen: 1
n_local_enhancers: 1
n_scales_spatial: 3
name: label2city_2048
ndf: 64
nef: 32
netE: simple
netG: composite
ngf: 128
no_first_img: False
no_flip: False
norm: batch
ntest: inf
output_nc: 3
phase: test
resize_or_crop: scaleWidth
results_dir: ./results/
serial_batches: False
tf_log: False
use_instance: True
use_real_img: False
use_single_G: True
which_epoch: latest
-------------- End ----------------
CustomDatasetDataLoader
dataset [TestDataset] was created
vid2vid
---------- Networks initialized -------------
-----------------------------------------------
Traceback (most recent call last):
File "test.py", line 24, in <module>
model = create_model(opt)
File "/vid2vid/models/models.py", line 19, in create_model
modelG.initialize(opt)
File "/vid2vid/models/vid2vid_model_G.py", line 51, in initialize
self.netG_i = self.load_single_G() if self.use_single_G else None
File "/vid2vid/models/vid2vid_model_G.py", line 270, in load_single_G
netG = networks.define_G(input_nc, opt.output_nc, 0, 32, 'local', 4, 'instance', 0, self.gpu_ids, opt)
File "/vid2vid/models/networks.py", line 39, in define_G
netG = LocalEnhancer(input_nc, output_nc, ngf, n_downsampling, opt.n_blocks, opt.n_local_enhancers, opt.n_blocks_local, norm_layer)
File "/vid2vid/models/networks.py", line 320, in __init__
model_global = GlobalGenerator(input_nc, output_nc, ngf_global, n_downsample_global, n_blocks_global, norm_layer).model
File "/vid2vid/models/networks.py", line 286, in __init__
model = [nn.ReflectionPad2d(3), nn.Conv2d(input_nc, ngf, kernel_size=7, padding=0), norm_layer(ngf), activation]
TypeError: __init__() got an unexpected keyword argument 'track_running_stats'
TypeError: init() got an unexpected keyword argument 'track_running_stats'
This error should be solved by using pyTorch >= 0.4.
I run this command
And got this error:
ImportError: /vid2vid/models/flownet2_pytorch/networks/resample2d_package/_ext/resample2d/_resample2d.so: undefined symbol: PyInt_FromLong
Why?How?