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

gradient with Theano #21

Open
lengocduc195khtn opened this issue Aug 4, 2023 · 0 comments
Open

gradient with Theano #21

lengocduc195khtn opened this issue Aug 4, 2023 · 0 comments

Comments

@lengocduc195khtn
Copy link

Thanks for your paper about Medical Prediction: GRAM.
I'm using your code to learn about how it works. But it has a problem as follow.

WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions. initializing parameters loading data building models OrderedDict([('w', w), ('w_tilde', w_tilde), ('b', b), ('b_tilde', b_tilde)]) Traceback (most recent call last): File "glove.py", line 163, in <module> train_glove(infile, inputSize=inputDimSize, batchSize=batchSize, dimensionSize=embDimSize, maxEpochs=maxEpochs, outfile=outfile) File "glove.py", line 119, in train_glove grads = T.grad(cost, wrt=tparams.values) File "/usr/local/lib/python3.8/dist-packages/theano/gradient.py", line 501, in grad raise TypeError("Expected Variable, got " + str(elem) + TypeError: Expected Variable, got <built-in method values of collections.OrderedDict object at 0x7f778bf1c1c0> of type <class 'builtin_function_or_method'>

That is the result when I run glove.py. I don't know the reason why it happens.
Thank you for your attention.

Le Ngoc Duc.

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