samson-wang/dcgan.caffe

AttributeError: 'Net' object has no attribute...

Closed this issue · 2 comments

Hi,
I am glade to find a caffe-based GAN implementation.
I installed the caffe deepsim-caffe-branch branch and compiled it. When I run
print "Caffe path:", caffe.__file__
I obtain ~/gan-caffe/python/caffe/__init__.pyc
which is the path of this branch in my pc

I have declared

generator = caffe.AdamSolver('solver_generator.prototxt')
discriminator = caffe.AdamSolver('solver_discriminator.prototxt')

However, when I run the train.py I keep having the following errors

    discriminator.net.forward_simple()
AttributeError: 'Net' object has no attribute 'forward_simple'

    generator.increment_iter()
AttributeError: 'AdamSolver' object has no attribute 'increment_iter'

    generator.net.clear_param_diffs()
AttributeError: 'Net' object has no attribute 'clear_param_diffs'

And the same error practically with all functions.
When I changed forward_simple() to forward() and backward_simple() to backward() it worked!

Thank you for the help

@zinebAb I think you probably used a master branch which didn't implement those functions.
Pleas refer to #1 .
In your repo root, i.e. ~/gan-caffe/, type git branch, deepsim should be highlighted.

@samson-wang It worked perfectly, Thank you!