Discussion:
[theano-users] global name 'float32_shared_constructor' is not defined
Rakesh Malviya
2018-02-01 06:38:14 UTC
Permalink
Hi,

I am running theano code from following
repo https://github.com/luheng/deep_srl

I am getting following error:
Traceback (most recent call last):
File "python/train.py", line 163, in <module>
train_tagger(args)
File "python/train.py", line 85, in train_tagger
model = BiLSTMTaggerModel(data, config=config)
File
"/home/holmes/rakesh_work/deepSRL/deep_srl/python/neural_srl/theano/tagger.py",
line 67, in __init__
self.is_train)
File
"/home/holmes/rakesh_work/deepSRL/deep_srl/python/neural_srl/theano/layer.py",
line 248, in connect
return LSTMLayer.connect(self, inputs, mask, is_train)
File
"/home/holmes/rakesh_work/deepSRL/deep_srl/python/neural_srl/theano/layer.py",
line 167, in connect
self.recurrent_dropout_layer.generate_mask([batch_size,
self.hidden_dim], is_train)
File
"/home/holmes/rakesh_work/deepSRL/deep_srl/python/neural_srl/theano/layer.py",
line 472, in generate_mask
dtype=floatX)
File
"/home/holmes/intel/intelpython2/lib/python2.7/site-packages/theano/sandbox/rng_mrg.py",
line 1392, in binomial
x = self.uniform(size=size, dtype=dtype, nstreams=nstreams)
File
"/home/holmes/intel/intelpython2/lib/python2.7/site-packages/theano/sandbox/rng_mrg.py",
line 1357, in uniform
node_rstate = float32_shared_constructor(rstates)
NameError: global name 'float32_shared_constructor' is not defined

I searched for similar issues in github and this group but no sucess.
Please let me know if we can solve this ?

Thanks and regards,
Rakesh Malviya
--
---
You received this message because you are subscribed to the Google Groups "theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to theano-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Frédéric Bastien
2018-02-01 15:46:32 UTC
Permalink
Which version of Theano do you use? Updating Theano could help.

Fred
Hi,
I am running theano code from following repo
https://github.com/luheng/deep_srl
File "python/train.py", line 163, in <module>
train_tagger(args)
File "python/train.py", line 85, in train_tagger
model = BiLSTMTaggerModel(data, config=config)
File
"/home/holmes/rakesh_work/deepSRL/deep_srl/python/neural_srl/theano/tagger.py",
line 67, in __init__
self.is_train)
File
"/home/holmes/rakesh_work/deepSRL/deep_srl/python/neural_srl/theano/layer.py",
line 248, in connect
return LSTMLayer.connect(self, inputs, mask, is_train)
File
"/home/holmes/rakesh_work/deepSRL/deep_srl/python/neural_srl/theano/layer.py",
line 167, in connect
self.recurrent_dropout_layer.generate_mask([batch_size,
self.hidden_dim], is_train)
File
"/home/holmes/rakesh_work/deepSRL/deep_srl/python/neural_srl/theano/layer.py",
line 472, in generate_mask
dtype=floatX)
File
"/home/holmes/intel/intelpython2/lib/python2.7/site-packages/theano/sandbox/rng_mrg.py",
line 1392, in binomial
x = self.uniform(size=size, dtype=dtype, nstreams=nstreams)
File
"/home/holmes/intel/intelpython2/lib/python2.7/site-packages/theano/sandbox/rng_mrg.py",
line 1357, in uniform
node_rstate = float32_shared_constructor(rstates)
NameError: global name 'float32_shared_constructor' is not defined
I searched for similar issues in github and this group but no sucess.
Please let me know if we can solve this ?
Thanks and regards,
Rakesh Malviya
--
---
You received this message because you are subscribed to the Google Groups
"theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups "theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to theano-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Rakesh Malviya
2018-02-02 05:08:10 UTC
Permalink
Hi Fred,

I tried with different versions of Theano 0.8.2 , Theano 0.9.0 , And the
latest release. All are giving exact same error.

Traceback (most recent call last):
File "python/train.py", line 163, in <module>
train_tagger(args)
File "python/train.py", line 85, in train_tagger
model = BiLSTMTaggerModel(data, config=config)
File
"/home/holmes/rakesh_work/deepSRL/deep_srl/python/neural_srl/theano/tagger.py",
line 67, in __init__
self.is_train)
File
"/home/holmes/rakesh_work/deepSRL/deep_srl/python/neural_srl/theano/layer.py",
line 248, in connect
return LSTMLayer.connect(self, inputs, mask, is_train)
File
"/home/holmes/rakesh_work/deepSRL/deep_srl/python/neural_srl/theano/layer.py",
line 167, in connect
self.recurrent_dropout_layer.generate_mask([batch_size,
self.hidden_dim], is_train)
File
"/home/holmes/rakesh_work/deepSRL/deep_srl/python/neural_srl/theano/layer.py",
line 472, in generate_mask
dtype=floatX)
File
"/home/holmes/intel/intelpython2/lib/python2.7/site-packages/theano/sandbox/rng_mrg.py",
line 1392, in binomial
x = self.uniform(size=size, dtype=dtype, nstreams=nstreams)
File
"/home/holmes/intel/intelpython2/lib/python2.7/site-packages/theano/sandbox/rng_mrg.py",
line 1357, in uniform
node_rstate = float32_shared_constructor(rstates)
NameError: global name 'float32_shared_constructor' is not defined

Thanks and regards,
Rakesh
Post by Frédéric Bastien
Which version of Theano do you use? Updating Theano could help.
Fred
Hi,
I am running theano code from following repo
https://github.com/luheng/deep_srl
File "python/train.py", line 163, in <module>
train_tagger(args)
File "python/train.py", line 85, in train_tagger
model = BiLSTMTaggerModel(data, config=config)
File
"/home/holmes/rakesh_work/deepSRL/deep_srl/python/neural_srl/theano/tagger.py",
line 67, in __init__
self.is_train)
File
"/home/holmes/rakesh_work/deepSRL/deep_srl/python/neural_srl/theano/layer.py",
line 248, in connect
return LSTMLayer.connect(self, inputs, mask, is_train)
File
"/home/holmes/rakesh_work/deepSRL/deep_srl/python/neural_srl/theano/layer.py",
line 167, in connect
self.recurrent_dropout_layer.generate_mask([batch_size,
self.hidden_dim], is_train)
File
"/home/holmes/rakesh_work/deepSRL/deep_srl/python/neural_srl/theano/layer.py",
line 472, in generate_mask
dtype=floatX)
File
"/home/holmes/intel/intelpython2/lib/python2.7/site-packages/theano/sandbox/rng_mrg.py",
line 1392, in binomial
x = self.uniform(size=size, dtype=dtype, nstreams=nstreams)
File
"/home/holmes/intel/intelpython2/lib/python2.7/site-packages/theano/sandbox/rng_mrg.py",
line 1357, in uniform
node_rstate = float32_shared_constructor(rstates)
NameError: global name 'float32_shared_constructor' is not defined
I searched for similar issues in github and this group but no sucess.
Please let me know if we can solve this ?
Thanks and regards,
Rakesh Malviya
--
---
You received this message because you are subscribed to the Google Groups
"theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups "theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to theano-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Rakesh Malviya
2018-02-02 07:56:07 UTC
Permalink
Solved the issue by:

1. I replaced mkl 2018 to mkl 2017 by using conda install mkl=2017
2. Removed conda theano: conda uninstall theano
3. Used pip theano : pip install theano

Thanks and regards,
Rakesh
Hi,
I am running theano code from following repo
https://github.com/luheng/deep_srl
File "python/train.py", line 163, in <module>
train_tagger(args)
File "python/train.py", line 85, in train_tagger
model = BiLSTMTaggerModel(data, config=config)
File
"/home/holmes/rakesh_work/deepSRL/deep_srl/python/neural_srl/theano/tagger.py",
line 67, in __init__
self.is_train)
File
"/home/holmes/rakesh_work/deepSRL/deep_srl/python/neural_srl/theano/layer.py",
line 248, in connect
return LSTMLayer.connect(self, inputs, mask, is_train)
File
"/home/holmes/rakesh_work/deepSRL/deep_srl/python/neural_srl/theano/layer.py",
line 167, in connect
self.recurrent_dropout_layer.generate_mask([batch_size,
self.hidden_dim], is_train)
File
"/home/holmes/rakesh_work/deepSRL/deep_srl/python/neural_srl/theano/layer.py",
line 472, in generate_mask
dtype=floatX)
File
"/home/holmes/intel/intelpython2/lib/python2.7/site-packages/theano/sandbox/rng_mrg.py",
line 1392, in binomial
x = self.uniform(size=size, dtype=dtype, nstreams=nstreams)
File
"/home/holmes/intel/intelpython2/lib/python2.7/site-packages/theano/sandbox/rng_mrg.py",
line 1357, in uniform
node_rstate = float32_shared_constructor(rstates)
NameError: global name 'float32_shared_constructor' is not defined
I searched for similar issues in github and this group but no sucess.
Please let me know if we can solve this ?
Thanks and regards,
Rakesh Malviya
--
---
You received this message because you are subscribed to the Google Groups "theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to theano-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Frédéric Bastien
2018-02-07 20:29:32 UTC
Permalink
Thanks for your solution. But I think you had multiple Theano version
installed. Removing the conda version and updating the pip version seem to
fix your problem.

Fred
Post by Rakesh Malviya
1. I replaced mkl 2018 to mkl 2017 by using conda install mkl=2017
2. Removed conda theano: conda uninstall theano
3. Used pip theano : pip install theano
Thanks and regards,
Rakesh
Hi,
I am running theano code from following repo
https://github.com/luheng/deep_srl
File "python/train.py", line 163, in <module>
train_tagger(args)
File "python/train.py", line 85, in train_tagger
model = BiLSTMTaggerModel(data, config=config)
File
"/home/holmes/rakesh_work/deepSRL/deep_srl/python/neural_srl/theano/tagger.py",
line 67, in __init__
self.is_train)
File
"/home/holmes/rakesh_work/deepSRL/deep_srl/python/neural_srl/theano/layer.py",
line 248, in connect
return LSTMLayer.connect(self, inputs, mask, is_train)
File
"/home/holmes/rakesh_work/deepSRL/deep_srl/python/neural_srl/theano/layer.py",
line 167, in connect
self.recurrent_dropout_layer.generate_mask([batch_size,
self.hidden_dim], is_train)
File
"/home/holmes/rakesh_work/deepSRL/deep_srl/python/neural_srl/theano/layer.py",
line 472, in generate_mask
dtype=floatX)
File
"/home/holmes/intel/intelpython2/lib/python2.7/site-packages/theano/sandbox/rng_mrg.py",
line 1392, in binomial
x = self.uniform(size=size, dtype=dtype, nstreams=nstreams)
File
"/home/holmes/intel/intelpython2/lib/python2.7/site-packages/theano/sandbox/rng_mrg.py",
line 1357, in uniform
node_rstate = float32_shared_constructor(rstates)
NameError: global name 'float32_shared_constructor' is not defined
I searched for similar issues in github and this group but no sucess.
Please let me know if we can solve this ?
Thanks and regards,
Rakesh Malviya
--
---
You received this message because you are subscribed to the Google Groups
"theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups "theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to theano-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Continue reading on narkive:
Loading...