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

error in tutorial #21

Open
styleNie opened this issue Apr 13, 2016 · 0 comments
Open

error in tutorial #21

styleNie opened this issue Apr 13, 2016 · 0 comments

Comments

@styleNie
Copy link

Hi, I have install the deepy in windows7, and can run the tutorial1.py in experiments\tutorials, but when I run tutorial2.py, I have got an error like this
C:\Users\Administrator\Desktop\deepy-master\experiments\tutorials>python tutoria
l2.py
Using gpu device 0: GeForce GT 630 (CNMeM is enabled with initial size: 75.0% of
memory, CuDNN not available)
D:\soft\python\lib\site-packages\theano\tensor\signal\downsample.py:6: UserWarni
ng: downsample module has been moved to the theano.tensor.signal.pool module.
"downsample module has been moved to the theano.tensor.signal.pool module.")
INFO:deepy.networks.network:deepy version = 0.2.0
INFO:deepy.dataset.mnist:loading minst data
INFO:deepy.dataset.mnist:[mnist] training data size: 50000
INFO:deepy.dataset.mnist:[mnist] valid data size: 10000
INFO:deepy.dataset.mnist:[mnist] test data size: 10000
INFO:deepy.trainers.trainers:changing optimization method to 'MOMENTUM'
INFO:deepy.networks.network:network inputs: x
INFO:deepy.networks.network:network targets:
INFO:deepy.networks.network:network parameters:
INFO:deepy.networks.network:parameter count: 0
INFO:deepy.trainers.trainers:monitor list: J
INFO:deepy.trainers.trainers:compile evaluation function
INFO:deepy.trainers.trainers:compiling MomentumTrainer learning function
Traceback (most recent call last):
File "tutorial2.py", line 73, in
trainer = MomentumTrainer(model, {'weight_l2': 0.0001})
File "D:\soft\python\lib\site-packages\deepy\trainers\trainers.py", line 436,
in init
super(MomentumTrainer, self).init(network, config, "MOMENTUM")
File "D:\soft\python\lib\site-packages\deepy\trainers\trainers.py", line 354,
in init
learning_updates = list(self.learning_updates())
File "D:\soft\python\lib\site-packages\deepy\trainers\trainers.py", line 381,
in learning_updates
gradients = T.grad(self.cost, params)
File "D:\soft\python\lib\site-packages\theano\gradient.py", line 436, in grad
raise TypeError("cost must be a scalar.")
TypeError: cost must be a scalar.
can you help me?
Thanks!

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

1 participant