-
Notifications
You must be signed in to change notification settings - Fork 134
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
Theano Error: 'TensorVariable' object has no attribute 'cast' #38
Comments
Prediction also doesn't work of course. ValueError Traceback (most recent call last) C:\Anaconda\lib\site-packages\passage\models.pyc in fit(self, trX, trY, batch_size, n_epochs, len_filter, snapshot_freq, path) C:\Anaconda\lib\site-packages\passage\iterators.pyc in iterXY(self, X, Y) C:\Anaconda\lib\site-packages\passage\theano_utils.pyc in floatX(X) C:\Anaconda\lib\site-packages\numpy\core\numeric.pyc in asarray(a, dtype, order) ValueError: could not convert string to float: C |
Tried looking up your error,
and it might be related to the issue encountered on this stack overflow post: Try updating Theano again through conda
or perhaps set |
That worked, thanks! On Fri, Aug 7, 2015 at 8:24 AM, Ryan Louie [email protected] wrote:
Dan Ofer - דן עופר Photography |
Hi,
I'm trying to run the "example" on my own data.
After fitting the tokenizer, I get a big, long list of error messages from Theano.
Background: Windows 8.1. Anaconda + Python 2.7 64 bit. Latest Theano version, runs on GPU.
Passage installed from Pip.
Code:
tokenizer = Tokenizer( min_df=1, lowercase=False, character=False, max_features=10000)
X_train = tokenizer.fit_transform(X_train)
X_test = tokenizer.transform(X_test)
layers = [
Embedding(size=128, n_features=tokenizer.n_features),
GatedRecurrent(size=256, activation='tanh', gate_activation='steeper_sigmoid', init='orthogonal', seq_output=False),
Dense(size=1, activation='sigmoid', init='orthogonal') # sigmoid for binary classification
]
model = RNN(layers=layers, cost='bce')
Output:
'
ERROR (theano.gof.opt): Optimization failure due to: local_gpu_advanced_subtensor1
ERROR:theano.gof.opt:Optimization failure due to: local_gpu_advanced_subtensor1
ERROR (theano.gof.opt): TRACEBACK:
ERROR:theano.gof.opt:TRACEBACK:
ERROR (theano.gof.opt): Traceback (most recent call last):
File "d:\git\theano\theano\gof\opt.py", line 1485, in process_node
replacements = lopt.transform(node)
File "d:\git\theano\theano\sandbox\cuda\opt.py", line 980, in local_gpu_advanced_subtensor1
return [host_from_gpu(GpuAdvancedSubtensor1()(gpu_x, coords))]
File "d:\git\theano\theano\gof\op.py", line 507, in call
node = self.make_node(inputs, **kwargs)
File "d:\git\theano\theano\sandbox\cuda\basic_ops.py", line 2570, in make_node
ilist = ilist.cast('int64')
AttributeError: 'TensorVariable' object has no attribute 'cast'
ERROR:theano.gof.opt:Traceback (most recent call last):
File "d:\git\theano\theano\gof\opt.py", line 1485, in process_node
replacements = lopt.transform(node)
File "d:\git\theano\theano\sandbox\cuda\opt.py", line 980, in local_gpu_advanced_subtensor1
return [host_from_gpu(GpuAdvancedSubtensor1()(gpu_x, coords))]
File "d:\git\theano\theano\gof\op.py", line 507, in call
node = self.make_node(inputs, **kwargs)
File "d:\git\theano\theano\sandbox\cuda\basic_ops.py", line 2570, in make_node
ilist = ilist.cast('int64')
AttributeError: 'TensorVariable' object has no attribute 'cast'
ERROR (theano.gof.opt): Optimization failure due to: local_gpu_advanced_subtensor1
ERROR:theano.gof.opt:Optimization failure due to: local_gpu_advanced_subtensor1
ERROR (theano.gof.opt): TRACEBACK:
ERROR:theano.gof.opt:TRACEBACK:
ERROR (theano.gof.opt): Traceback (most recent call last):
File "d:\git\theano\theano\gof\opt.py", line 1485, in process_node
replacements = lopt.transform(node)
File "d:\git\theano\theano\sandbox\cuda\opt.py", line 974, in local_gpu_advanced_subtensor1
return [GpuAdvancedSubtensor1()(as_cuda_ndarray_variable(x), coords)]
File "d:\git\theano\theano\gof\op.py", line 507, in call
node = self.make_node(inputs, **kwargs)
File "d:\git\theano\theano\sandbox\cuda\basic_ops.py", line 2570, in make_node
ilist = ilist.cast('int64')
AttributeError: 'TensorVariable' object has no attribute 'cast'
ERROR:theano.gof.opt:Traceback (most recent call last):
File "d:\git\theano\theano\gof\opt.py", line 1485, in process_node
replacements = lopt.transform(node)
File "d:\git\theano\theano\sandbox\cuda\opt.py", line 974, in local_gpu_advanced_subtensor1
return [GpuAdvancedSubtensor1()(as_cuda_ndarray_variable(x), coords)]
File "d:\git\theano\theano\gof\op.py", line 507, in call
node = self.make_node(inputs, **kwargs)
File "d:\git\theano\theano\sandbox\cuda\basic_ops.py", line 2570, in make_node
ilist = ilist.cast('int64')
AttributeError: 'TensorVariable' object has no attribute 'cast'
ERROR (theano.gof.opt): Optimization failure due to: local_gpu_advanced_subtensor1
ERROR:theano.gof.opt:Optimization failure due to: local_gpu_advanced_subtensor1
ERROR (theano.gof.opt): TRACEBACK:
ERROR:theano.gof.opt:TRACEBACK:
ERROR (theano.gof.opt): Traceback (most recent call last):
File "d:\git\theano\theano\gof\opt.py", line 1485, in process_node
replacements = lopt.transform(node)
File "d:\git\theano\theano\sandbox\cuda\opt.py", line 974, in local_gpu_advanced_subtensor1
return [GpuAdvancedSubtensor1()(as_cuda_ndarray_variable(x), coords)]
File "d:\git\theano\theano\gof\op.py", line 507, in call
node = self.make_node(inputs, **kwargs)
File "d:\git\theano\theano\sandbox\cuda\basic_ops.py", line 2570, in make_node
ilist = ilist.cast('int64')
AttributeError: 'TensorVariable' object has no attribute 'cast'
ERROR:theano.gof.opt:Traceback (most recent call last):
File "d:\git\theano\theano\gof\opt.py", line 1485, in process_node
replacements = lopt.transform(node)
File "d:\git\theano\theano\sandbox\cuda\opt.py", line 974, in local_gpu_advanced_subtensor1
return [GpuAdvancedSubtensor1()(as_cuda_ndarray_variable(x), coords)]
File "d:\git\theano\theano\gof\op.py", line 507, in call
node = self.make_node(inputs, **kwargs)
File "d:\git\theano\theano\sandbox\cuda\basic_ops.py", line 2570, in make_node
ilist = ilist.cast('int64')
AttributeError: 'TensorVariable' object has no attribute 'cast'
'
Thanks!
The text was updated successfully, but these errors were encountered: