मैं "debugf.py IPython" चलाने के लिए पूर्णांक के टुकड़ा प्रविष्टि मजबूर करने के लिए असफल हो और यह मेरेIndexError: tensorvariable प्रकार
IndexError Traceback (most recent call last)
/home/ml/debugf.py in <module>()
8 fff = theano.function(inputs=[index],
9 outputs=cost,
---> 10 givens={x: train_set_x[index: index+1]})
IndexError: failed to coerce slice entry of type TensorVariable to integer"
मैं मंच और कोई भाग्य खोज नीचे के रूप में त्रुटि संदेश दिया था, वहाँ कोई कर सकता है मदद ? धन्यवाद!
debugf.py:
import theano.tensor as T
import theano
import numpy
index =T.lscalar()
x=T.dmatrix()
cost=x +index
train_set_x=numpy.arange(100).reshape([20,5])
fff=theano.function(inputs=[index],
outputs=cost,
givens={x:train_set_x[index: index+1]}) #<--- Error here
आपकी पोस्ट की शुरुआत में कुछ याद आ रही है। आपने इंडेक्स एरर क्या दिया? – Anthon