tflearn icon indicating copy to clipboard operation
tflearn copied to clipboard

Error in TF2.0... Any ideas?

Open samzhangjy opened this issue 4 years ago • 3 comments

Um, I know there are lots of dups here but I still want to ask this. When importing tflearn, I got the following error:

Traceback (most recent call last):
  File "/Users/sam/Desktop/Python/ML/TensorFlow/TCB/venv/lib/python3.6/site-packages/tflearn/helpers/summarizer.py", line 9, in <module>
    merge_summary = tf.summary.merge
AttributeError: module 'tensorboard.summary._tf.summary' has no attribute 'merge'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/sam/Desktop/Python/ML/TensorFlow/TCB/main.py", line 4, in <module>
    import tflearn
  File "/Users/sam/Desktop/Python/ML/TensorFlow/TCB/venv/lib/python3.6/site-packages/tflearn/__init__.py", line 8, in <module>
    from . import models
  File "/Users/sam/Desktop/Python/ML/TensorFlow/TCB/venv/lib/python3.6/site-packages/tflearn/models/__init__.py", line 2, in <module>
    from .dnn import DNN
  File "/Users/sam/Desktop/Python/ML/TensorFlow/TCB/venv/lib/python3.6/site-packages/tflearn/models/dnn.py", line 6, in <module>
    from ..helpers.trainer import Trainer
  File "/Users/sam/Desktop/Python/ML/TensorFlow/TCB/venv/lib/python3.6/site-packages/tflearn/helpers/__init__.py", line 2, in <module>
    from .evaluator import Evaluator
  File "/Users/sam/Desktop/Python/ML/TensorFlow/TCB/venv/lib/python3.6/site-packages/tflearn/helpers/evaluator.py", line 9, in <module>
    from .trainer import evaluate_flow
  File "/Users/sam/Desktop/Python/ML/TensorFlow/TCB/venv/lib/python3.6/site-packages/tflearn/helpers/trainer.py", line 20, in <module>
    from .summarizer import summaries, summarize, summarize_gradients, \
  File "/Users/sam/Desktop/Python/ML/TensorFlow/TCB/venv/lib/python3.6/site-packages/tflearn/helpers/summarizer.py", line 12, in <module>
    merge_summary = tf.merge_summary
AttributeError: module 'tensorflow' has no attribute 'merge_summary'

I'm using Python3.6 and have installed tflearn using git, but this error still bothers me. By the way, is this project dead? Will it support tf2... I'm new to tensorflow, so I might have some configs wrong. Thanks!

samzhangjy avatar May 27 '20 12:05 samzhangjy

I think this project probably is not on going now... A lot of modifications have to be made as tf2 came up.

don't know your code, but I think you may need to check the tf website for more detailed information on those changes:https://www.tensorflow.org/api_docs/python/tf/summary

xinli-cm avatar Jul 06 '20 18:07 xinli-cm

TFLEARN is a relic of the past. Try keras

Peter

PeterGardas avatar Aug 13 '20 09:08 PeterGardas

Hi, sorry for the long wait, I added support to TF v2+ in latest release

aymericdamien avatar Nov 11 '20 21:11 aymericdamien