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

test_cca error! #1

Open
Chrisdy opened this issue May 4, 2015 · 6 comments
Open

test_cca error! #1

Chrisdy opened this issue May 4, 2015 · 6 comments

Comments

@Chrisdy
Copy link

Chrisdy commented May 4, 2015

I have run the function test_caa() in dcca.py, then it shows error as follows:
Traceback (most recent call last):
File "/Users/dingheng/Downloads/deepcca-master/dcca.py", line 1053, in
test_dcca()
File "/Users/dingheng/Downloads/deepcca-master/dcca.py", line 792, in test_dcca
gparams1 = [T.grad(cost1, param) for param in net1.hiddenLayer.params]
File "/usr/local/lib/python2.7/site-packages/theano/gradient.py", line 529, in grad
handle_disconnected(elem)
File "/usr/local/lib/python2.7/site-packages/theano/gradient.py", line 516, in handle_disconnected
raise DisconnectedInputError(message)
theano.gradient.DisconnectedInputError: grad method was asked to compute the gradient with respect to a variable that is not part of the computational graph of the cost, or is used only by a non-differentiable operator: b

How to fixed it ?

@jtuckerk
Copy link

jtuckerk commented Apr 7, 2016

I am getting the same error. @Chrisdy did you find a solution?

@shamidreza
Copy link
Owner

Thanks for reporting the issue. I am looking to fix the training in theano.
Until it is fixed you can look at dcca_numpy.py, which is a direct numpy implementation of dCCA (not theano), but the training is slower.

@apple666
Copy link

I run dcca_numpy.py,and it indicates that the train takes at least 3 arguments.I add N as the first parameter,but the repeat function get a error.I don't know how to solve it,could you help me?
Here is the information of error.
File "C:/Users/Administrator/Desktop/deepcca-master/dcca_numpy.py", line 736, in test_regression
N.train(10, learning_rate=rate) line 736
train() takes at least 3 arguments (3 given)

@shamidreza
Copy link
Owner

Thanks for reporting the error. I plan to solve these issues in mid-June. At the moment the library is unstable since I have not maintained it.

@rawalvarun
Copy link

rawalvarun commented Jun 13, 2016

@shamidreza Has the issue been fixed ?

@kirvenjt @Chrisdy did you figure out a fix ?

I'm getting the same error on the latest commit -

... loading data ... building the model Traceback (most recent call last): File "trial_1.py", line 7, in <module> test_dcca() File "dcca.py", line 794, in test_dcca gparams1 = [T.grad(cost1, param) for param in net1.hiddenLayer.params] File "/usr/local/lib/python2.7/dist-packages/theano/gradient.py", line 545, in grad handle_disconnected(elem) File "/usr/local/lib/python2.7/dist-packages/theano/gradient.py", line 532, in handle_disconnected raise DisconnectedInputError(message) theano.gradient.DisconnectedInputError: grad method was asked to compute the gradient with respect to a variable that is not part of the computational graph of the cost, or is used only by a non-differentiable operator: b Backtrace when the node is created: File "trial_1.py", line 7, in <module> test_dcca() File "dcca.py", line 729, in test_dcca n_out=8 File "dcca.py", line 204, in __init__ activation=T.nnet.sigmoid File "mlp.py", line 60, in __init__ b = theano.shared(value=b_values, name='b', borrow=True)

@rahmacha
Copy link

Hi,
I am having the same error of @Chrisdy trying to run test_dcca() in dcca.py. Did you figure out a fix? Thank you

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

6 participants