没用过tensorflow, 装的1.14.0,大量warning
Opened this issue · 5 comments
WenjiaWang0312 commented
我什么也没跑,只是改了下model.py,想看下网络结构
python3 model.py
在最后加入下面内容
if __name__ =='__main__':
from IPython import embed
embed()
s=SRNet()
然后就这样
WARNING:tensorflow:Entity <bound method BatchNormalization.call of <tensorflow.python.layers.normalization.Ba$
chNormalization object at 0x7f3905978cf8>> could not be transformed and will be executed as-is. Please report
this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOS$
TY=10`) and attach the full output. Cause: converting <bound method BatchNormalization.call of <tensorflow.pyt
hon.layers.normalization.BatchNormalization object at 0x7f3905978cf8>>: AssertionError: Bad argument number fo
r Name: 3, expecting 4
WARNING:tensorflow:Entity <bound method Conv.call of <tensorflow.python.layers.convolutional.Conv2D object at
0x7f3905978cf8>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph tea
m. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the ful
l output. Cause: converting <bound method Conv.call of <tensorflow.python.layers.convolutional.Conv2D object a
t 0x7f3905978cf8>>: AssertionError: Bad argument number for Name: 3, expecting 4
WARNING:tensorflow:Entity <bound method BatchNormalization.call of <tensorflow.python.layers.normalization.Bat
chNormalization object at 0x7f3905978cf8>> could not be transformed and will be executed as-is. Please report
this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSI
TY=10`) and attach the full output. Cause: converting <bound method BatchNormalization.call of <tensorflow.pyt
hon.layers.normalization.BatchNormalization object at 0x7f3905978cf8>>: AssertionError: Bad argument number fo
r Name: 3, expecting 4
这种错误报几百行
WenjiaWang0312 commented
请问作者大大,是不是少装了什么库?
还有这种错误
ValueError: Variable G/generator_tcn_t_encoder_conv1_1_conv/ker
nel already exists, disallowed. Did you mean to
set reuse=True or reuse=tf.AUTO_REUSE in VarScope? Originally defined at:
File "model.py", line 51, in _conv_bn_relu
x = tf.layers.conv2d(x, cnum, kernel_size = 3, strides = 1, activation = None, padding = padding, name = n
ame + '_conv')
File "model.py", line 66, in build_encoder_net
x = self._conv_bn_relu(x, self.cnum, name = name + '_conv1_1')
File "model.py", line 119, in build_text_conversion_net
x_t = self.build_encoder_net(x_t, name = name + '_t_encoder')
File "model.py", line 174, in build_generator
o_sk, o_t = self.build_text_conversion_net(i_t, i_s, name = name + '_tcn')
File "model.py", line 186, in build_whole_net_with_loss
o_sk, o_t, o_b, o_f = self.build_generator(inputs)
ursaminor0401 commented
我什么也没跑,只是改了下model.py,想看下网络结构
python3 model.py
在最后加入下面内容if __name__ =='__main__': from IPython import embed embed() s=SRNet()
然后就这样
WARNING:tensorflow:Entity <bound method BatchNormalization.call of <tensorflow.python.layers.normalization.Ba$ chNormalization object at 0x7f3905978cf8>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOS$ TY=10`) and attach the full output. Cause: converting <bound method BatchNormalization.call of <tensorflow.pyt hon.layers.normalization.BatchNormalization object at 0x7f3905978cf8>>: AssertionError: Bad argument number fo r Name: 3, expecting 4 WARNING:tensorflow:Entity <bound method Conv.call of <tensorflow.python.layers.convolutional.Conv2D object at 0x7f3905978cf8>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph tea m. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the ful l output. Cause: converting <bound method Conv.call of <tensorflow.python.layers.convolutional.Conv2D object a t 0x7f3905978cf8>>: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity <bound method BatchNormalization.call of <tensorflow.python.layers.normalization.Bat chNormalization object at 0x7f3905978cf8>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSI TY=10`) and attach the full output. Cause: converting <bound method BatchNormalization.call of <tensorflow.pyt hon.layers.normalization.BatchNormalization object at 0x7f3905978cf8>>: AssertionError: Bad argument number fo r Name: 3, expecting 4
这种错误报几百行
你好,这种warning是因为gast包版本问题,pip install gast==0.2.2
后会消除这些warning
ursaminor0401 commented
请问作者大大,是不是少装了什么库?
还有这种错误ValueError: Variable G/generator_tcn_t_encoder_conv1_1_conv/ker nel already exists, disallowed. Did you mean to set reuse=True or reuse=tf.AUTO_REUSE in VarScope? Originally defined at: File "model.py", line 51, in _conv_bn_relu x = tf.layers.conv2d(x, cnum, kernel_size = 3, strides = 1, activation = None, padding = padding, name = n ame + '_conv') File "model.py", line 66, in build_encoder_net x = self._conv_bn_relu(x, self.cnum, name = name + '_conv1_1') File "model.py", line 119, in build_text_conversion_net x_t = self.build_encoder_net(x_t, name = name + '_t_encoder') File "model.py", line 174, in build_generator o_sk, o_t = self.build_text_conversion_net(i_t, i_s, name = name + '_tcn') File "model.py", line 186, in build_whole_net_with_loss o_sk, o_t, o_b, o_f = self.build_generator(inputs)
我这里没有出现这种问题,看样子是节点名重复了,有修改过模型结构么?
wode-czw commented
太谢谢了,舒服了,查了各种关闭 warninig的博客都没解决
gioipv commented
I did use pytorch version instead of this version, becasause of, in this version, i can not use gpu despite of i set os.environ['CUDA...']='0' . I also try fix this issue by search on google search to fix. set tf.session(config) ..... but it still cannot run on gpu.