eriklindernoren / ML-From-Scratch

Machine Learning From Scratch. Bare bones NumPy implementations of machine learning models and algorithms with a focus on accessibility. Aims to cover everything from linear regression to deep learning.
MIT License
23.58k stars 4.55k forks source link

An error raised when run dcgan.py. #29

Closed ljch2018 closed 6 years ago

ljch2018 commented 6 years ago

I run python mlfromscratch/unsupervised_learning/dcgan.py,

The output is like that:

33 [D loss: 0.029268, acc: 100.00%] [G loss: 5.641379, acc: 0.00%]
34 [D loss: 0.024022, acc: 100.00%] [G loss: 5.165160, acc: 0.00%]
35 [D loss: 0.043149, acc: 96.88%] [G loss: 5.387241, acc: 0.00%]
36 [D loss: 0.017758, acc: 100.00%] [G loss: 5.255211, acc: 0.00%]
python2.7/lib/python2.7/site-packages/mlfromscratch-0.0.4-py2.7.egg/mlfromscratch/utils/layers.py:486: RuntimeWarning: invalid value encountered in multiply
python2.7/lib/python2.7/site-packages/mlfromscratch-0.0.4-py2.7.egg/mlfromscratch/utils/activation_functions.py:54: RuntimeWarning: invalid value encountered in greater_equal
python2.7/lib/python2.7/site-packages/mlfromscratch-0.0.4-py2.7.egg/mlfromscratch/utils/activation_functions.py:57: RuntimeWarning: invalid value encountered in greater_equal
37 [D loss: 0.020248, acc: 100.00%] [G loss: nan, acc: 100.00%]
38 [D loss: nan, acc: 50.00%] [G loss: nan, acc: 100.00%]
39 [D loss: nan, acc: 50.00%] [G loss: nan, acc: 100.00%]
40 [D loss: nan, acc: 50.00%] [G loss: nan, acc: 100.00%]
...

Thank you.

eriklindernoren commented 6 years ago

I have not got DCGAN to converge yet, unfortunately. Because of this it is not listed as implemented.

ljch2018 commented 6 years ago

@eriklindernoren Thanks, and this is great work.