Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question~ #1

Open
CXSunshine opened this issue Mar 11, 2018 · 4 comments
Open

question~ #1

CXSunshine opened this issue Mar 11, 2018 · 4 comments

Comments

@CXSunshine
Copy link

Hello,
when I run the code,I have some touble in understanding the errors that the program generated.
Traceback (most recent call last):
File "main.py", line 33, in
main()
File "main.py", line 28, in main
model.train()
File "F:\pythonprogram\semi-supervised-GAN-master\train.py", line 132, in train
plot.flush()
File "F:\pythonprogram\semi-supervised-GAN-master\vlib\plot.py", line 37, in flush
prints.append("{}\t{}".format(name, np.mean(vals.values())))
File "C:\Users\admin\Anaconda3\lib\site-packages\numpy\core\fromnumeric.py", line 2957, in mean
out=out, **kwargs)
File "C:\Users\admin\Anaconda3\lib\site-packages\numpy\core_methods.py", line 82, in _mean
ret = ret / rcount
TypeError: unsupported operand type(s) for /: 'dict_values' and 'int'

Can you help me solve this problem?

@CXSunshine
Copy link
Author

I just get the test accuracy 0.5333,not the 0.99?

@LDOUBLEV
Copy link
Owner

@CXSunshine hi, I fine-tune the code by loading trained weights for MNIST generation. the final weights in model_saved file have higher test accuracy, you can test it. on the other side , the d loss function is something wrong. i made some change. i will test it when i have free time. and it is glad to get your advice to help me improve the code.

@CXSunshine
Copy link
Author

ok,i will have a try.
Progress together!hahah~

@wudongya1226
Copy link

@CXSunshine @LDOUBLEV
I also have the same mistakes as you.
TypeError: unsupported operand type(s) for /: 'dict_values' and 'int'
Could you please tell me how do you solve it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants