@katsuki5080

Are you sure you want to delete the question?

If your question is resolved, you may close it.

Leaving a resolved question undeleted may help others!

We hope you find it useful!

pythonのエラー修正方法を教えて下さい。

pythonで以下のエラーが出ています。

AttributeError: module 'tensorflow' has no attribute 'contrib'

調べたところ、tensorflowのバージョンによるものらしいのですが、GPUの設定の関係でバージョンを落としたくありません。また、仮にバージョンを変えたとしても、今度は別の部分でバージョンによるエラーが出てしまいます。

どのように直せばいいのでしょうか?教えていただけると幸いです。

該当コードの、元のURLです。↓

def __call__(self, x, train=True):
    return tf.contrib.layers.batch_norm(x,
                      decay=self.momentum,
                      updates_collections=None,
                      epsilon=self.epsilon,
                      scale=True,
                      is_training=train,
                      scope=self.name)

https://github.com/GV1028/videogan

0 likes

1Answer

Comments

  1. @katsuki5080

    Questioner

    回答ありがとうございます。リンク先は以前見たことがあるのですがよくわかりませんでした…

Your answer might help someone💌