Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AttributeError: 'module' object has no attribute 'add_arg_scope'

I am trying to use bleeding edge version of TFLearn (https://github.com/tflearn/tflearn), a deep learning library. However on importing tflearn into python file, I encounter an attribute error, the stack trace of which is given. In case, anyone has successfully installed the same version, kindly suggest a solution to the case.

  import tflearn
  File "/usr/local/lib/python2.7/dist-packages/tflearn/__init__.py", line 9, in <module>
    from . import models
  File "/usr/local/lib/python2.7/dist-packages/tflearn/models/__init__.py", line 2, in <module>
    from .dnn import DNN
  File "/usr/local/lib/python2.7/dist-packages/tflearn/models/dnn.py", line 5, in <module>
    from ..helpers.trainer import Trainer
  File "/usr/local/lib/python2.7/dist-packages/tflearn/helpers/__init__.py", line 2, in <module>
    from .evaluator import Evaluator
  File "/usr/local/lib/python2.7/dist-packages/tflearn/helpers/evaluator.py", line 6, in <module>
    from ..utils import to_list
  File "/usr/local/lib/python2.7/dist-packages/tflearn/utils.py", line 16, in <module>
    import tflearn.variables as vs
  File "/usr/local/lib/python2.7/dist-packages/tflearn/variables.py", line 8, in <module>
    @tf.contrib.framework.add_arg_scope
AttributeError: 'module' object has no attribute 'add_arg_scope'
like image 346
user3480922 Avatar asked Apr 17 '26 07:04

user3480922


1 Answers

Which version of TensorFlow are you using? It might be too old. Try update your TensorFlow version to 0.8 or 0.9, that should fix that issue.

like image 61
Aymeric Damien Avatar answered Apr 18 '26 21:04

Aymeric Damien



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!