yanx27 / EverybodyDanceNow_reproduce_pytorch

Everybody dance now reproduced in pytorch
MIT License
605 stars 173 forks source link

in step 4 normalization.py, there is no directory “./data/target/train_yx2” #16

Open ml365 opened 5 years ago

ml365 commented 5 years ago

hi, i have a problem there.

when i run step4(normalization.py), find there is no directory "./data/target/train_yx2". what can i slove this error?

target_img = cv2.imread('./data/target/train_yx2/train_label/00001.png')[:,:,0] target_img_rgb = cv2.imread('./data/target/train_yx2/train_img/00001.png')

thanks

yanx27 commented 5 years ago

You can change train_yx2 with train, thanks for you feedback :)

ml365 commented 5 years ago

thx, your suggestion can work。But then,i encountered another problem。

my pytorch's version is 0.3.1, when i run ./face_enhancer/main.py, error like this (pose2pose) work@gzbh-ps-www149-dd8de /home/work/yuliang/EverybodyDanceNow.V2/face_enhancer$ python main.py Traceback (most recent call last): File "main.py", line 68, in <module> main(is_debug) File "main.py", line 56, in main generator, discriminator, batch_num = load_models(ckpt_dir, batch_num) File "main.py", line 23, in load_models discriminator = model.NLayerDiscriminator(input_nc=3, n_layers=3) # 48 input File "/home/work/yuliang/EverybodyDanceNow.V2/face_enhancer/model.py", line 123, in __init__ spectral_norm(norm_layer(ndf * nf_mult)), File "/home/work/yuliang/EverybodyDanceNow.V2/face_enhancer/utils/spectral_norm.py", line 93, in spectral_norm SpectralNorm.apply(module, name, n_power_iterations, eps) File "/home/work/yuliang/EverybodyDanceNow.V2/face_enhancer/utils/spectral_norm.py", line 54, in apply u = normalize(weight.new_empty(height).normal_(0, 1), dim=0, eps=fn.eps) File "/home/work/yuliang/env/anaconda3/envs/pose2pose/lib/python3.6/site-packages/torch/autograd/variable.py", line 67, in __getattr__ return object.__getattribute__(self, name) AttributeError: 'Parameter' object has no attribute 'new_empty'

I can't upgrade pytorch because of the system,how can i modify code to slove this problem.

best regards~