Skip to content
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

没用过tensorflow, 装的1.14.0,大量warning #4

Open
WenjiaWang0312 opened this issue Oct 10, 2019 · 5 comments
Open

没用过tensorflow, 装的1.14.0,大量warning #4

WenjiaWang0312 opened this issue Oct 10, 2019 · 5 comments

Comments

@WenjiaWang0312
Copy link

WenjiaWang0312 commented Oct 10, 2019

我什么也没跑,只是改了下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
Copy link
Author

请问作者大大,是不是少装了什么库?
还有这种错误


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)

@WenjiaWang0312 WenjiaWang0312 changed the title 没用过tensorflow, 装的1.14.0,大量报错和warning 没用过tensorflow, 装的1.14.0,大量warning Oct 10, 2019
@ursaminor0401
Copy link
Collaborator

我什么也没跑,只是改了下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
Copy link
Collaborator

请问作者大大,是不是少装了什么库?
还有这种错误


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
Copy link

太谢谢了,舒服了,查了各种关闭 warninig的博客都没解决

@gioipv
Copy link

gioipv commented Mar 4, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants