MaybeShewill-CV / attentive-gan-derainnet

Unofficial tensorflow implemention of "Attentive Generative Adversarial Network for Raindrop Removal from A Single Image (CVPR 2018) " model https://maybeshewill-cv.github.io/attentive-gan-derainnet/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

loss function

chenhuiphd opened this issue · comments

hi,Negative sign is added before the lgan variable in line 69 of the derain_drop_net.py file to make lgan positive? Right? thx

@chenhuiphd the inference result was the output of a sigmoid function:)

yes, My TF version is 1.10.The range of discriminate_inference value is between (0-1), so log (1-discriminate_inference) is negative. When I train, I find that generator loss will start to appear negative, and finally Nan will appear. So I think adding negative sign before lgan can make lgan positive, so that loss can be avoided in the case of negative numbers or nan.

@chenhuiphd I have met the same problem with tf 1.3 but nothing happened when I upgrade tensorflow from 1.3 into 1.12. Amazing tensorflow:)

FileNotFoundError: [Errno 2] No such file or directory: './data/vgg16.npy'

After downloading the file, the following problems occurred again. I hope you can help me when you see the message. Thank you very much

Traceback (most recent call last):
File "tools/train_model.py", line 339, in
train_model(args.dataset_dir, weights_path=args.weights_path)
File "tools/train_model.py", line 272, in train_model
encoding='latin1').item()
File "/home/409/anaconda3/envs/derain/lib/python3.5/site-packages/numpy/lib/npyio.py", line 453, in load
pickle_kwargs=pickle_kwargs)
File "/home/409/anaconda3/envs/derain/lib/python3.5/site-packages/numpy/lib/format.py", line 722, in read_array
raise ValueError("Object arrays cannot be loaded when "
ValueError: Object arrays cannot be loaded when allow_pickle=False