Giter Site home page Giter Site logo

Comments (2)

rahashwini avatar rahashwini commented on May 25, 2024

Traceback (most recent call last):
File "<pyshell#33>", line 1, in
T.shape(prediction).eval()
File "C:\Users\Ashwini\AppData\Local\Programs\Python\Python36\lib\site-packages\theano\gof\graph.py", line 522, in eval
self._fn_cache[inputs] = theano.function(inputs, self)
File "C:\Users\Ashwini\AppData\Local\Programs\Python\Python36\lib\site-packages\theano\compile\function.py", line 317, in function
output_keys=output_keys)
File "C:\Users\Ashwini\AppData\Local\Programs\Python\Python36\lib\site-packages\theano\compile\pfunc.py", line 486, in pfunc
output_keys=output_keys)
File "C:\Users\Ashwini\AppData\Local\Programs\Python\Python36\lib\site-packages\theano\compile\function_module.py", line 1839, in orig_function
name=name)
File "C:\Users\Ashwini\AppData\Local\Programs\Python\Python36\lib\site-packages\theano\compile\function_module.py", line 1487, in init
accept_inplace)
File "C:\Users\Ashwini\AppData\Local\Programs\Python\Python36\lib\site-packages\theano\compile\function_module.py", line 181, in std_fgraph
update_mapping=update_mapping)
File "C:\Users\Ashwini\AppData\Local\Programs\Python\Python36\lib\site-packages\theano\gof\fg.py", line 175, in init
self.import_r(output, reason="init")
File "C:\Users\Ashwini\AppData\Local\Programs\Python\Python36\lib\site-packages\theano\gof\fg.py", line 346, in import_r
self.import(variable.owner, reason=reason)
File "C:\Users\Ashwini\AppData\Local\Programs\Python\Python36\lib\site-packages\theano\gof\fg.py", line 391, in import
raise MissingInputError(error_msg, variable=r)
theano.gof.fg.MissingInputError: Input 0 of the graph (indices start from 0), used to compute dot(X_train, W), was not provided and not given a value. Use the Theano flag exception_verbosity='high', for more information on this error.

Backtrace when that variable is created:

File "", line 1, in
File "C:\Users\Ashwini\AppData\Local\Programs\Python\Python36\lib\idlelib\run.py", line 144, in main
ret = method(*args, **kwargs)
File "C:\Users\Ashwini\AppData\Local\Programs\Python\Python36\lib\idlelib\run.py", line 474, in runcode
exec(code, self.locals)
File "G:\Implementation of the Project\Deep Neural Network for Learning to Rank\ispamm-group-lasso-deep-networks-179b38d3edb5\ispamm-group-lasso-deep-networks-179b38d3edb5\test7_list.py", line 130, in
input_var = T.matrix(name='X_train')

from lasagne.

f0k avatar f0k commented on May 25, 2024

T.shape(prediction).eval()

eval() won't work unless you also give it some concrete input, such as T.shape(prediction).eval({input_var: your_input_data_as_a_numpy_array}).

If you're just interested in the shape of the prediction, however, you'll probably want to query the output layer of your network: output_layer.output_shape or network.output_shape, however it's called in your code. This will provide the shape tracked by Lasagne while creating the network, as far as it can be inferred from the shape given to the InputLayer. If the InputLayer shape is incomplete, you can use lasagne.layers.get_output_shape(network, (1, 2, 3, 4)) to compute the output shape for an input of shape (1, 2, 3, 4).

from lasagne.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.