Open ddofer opened 9 years ago
Prediction also doesn't work of course. model.fit(X_train,y_train) Output:
ValueError Traceback (most recent call last)
Tried looking up your error,
AttributeError: 'TensorVariable' object has no attribute 'cast'
and it might be related to the issue encountered on this stack overflow post: http://stackoverflow.com/questions/19489259/accessing-data-of-a-theano-shared-variable
Try updating Theano again through conda
conda update conda
conda update Theano
or perhaps set DYLD_FALLBACK_LIBRARY_PATH="/Users/Me/anaconda/lib"
per the stack overflow question? Please let me know how it goes, getting packages working on different systems is always a challenge that is not fun, IMO!
That worked, thanks!
On Fri, Aug 7, 2015 at 8:24 AM, Ryan Louie notifications@github.com wrote:
Tried looking up your error,
AttributeError: 'TensorVariable' object has no attribute 'cast'
and it might be related to the issue encountered on this stack overflow post:
http://stackoverflow.com/questions/19489259/accessing-data-of-a-theano-shared-variable
Try updating Theano again through conda
conda update conda conda update Theano
or perhaps set DYLD_FALLBACK_LIBRARY_PATH="/Users/Me/anaconda/lib" per the stack overflow question? Please let me know how it goes, getting packages working on different systems is always a challenge that is not fun, IMO!
— Reply to this email directly or view it on GitHub https://github.com/IndicoDataSolutions/Passage/issues/38#issuecomment-128602106 .
Dan Ofer - דן עופר Publications http://scholar.google.co.il/citations?hl=en&user=uDx2ItYAAAAJ
Photography http://picasaweb.google.com/ddofer http://500px.com/DanOfer
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 makenode 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 makenode 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 makenode 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 makenode 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 makenode 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 makenode ilist = ilist_.cast('int64') AttributeError: 'TensorVariable' object has no attribute 'cast' '