tflearn / tflearn

Deep learning library featuring a higher-level API for TensorFlow.
http://tflearn.org
Other
9.62k stars 2.41k forks source link

Error in TF2.0... Any ideas? #1151

Open samzhangjy opened 4 years ago

samzhangjy commented 4 years ago

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!

xinli-cm commented 4 years ago

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

PeterGardas commented 4 years ago

TFLEARN is a relic of the past. Try keras

Peter

aymericdamien commented 3 years ago

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