profile
viewpoint

Ask questionsModuleNotFoundError: No module named 'tensorflow.contrib'

import tflearn from tflearn.layers.conv import conv_2d, max_pool_2d from tflearn.layers.core import input_data, dropout, fully_connected from tflearn.layers.estimator import regression

convnet = input_data(shape=[None, IMG_SIZE, IMG_SIZE, 1], name='input')

convnet = conv_2d(convnet, 32, 2, activation='relu') convnet = max_pool_2d(convnet, 2)

convnet = conv_2d(convnet, 64, 2, activation='relu') convnet = max_pool_2d(convnet, 2)

convnet = fully_connected(convnet, 1024, activation='relu') convnet = dropout(convnet, 0.8)

convnet = fully_connected(convnet, 2, activation='softmax') convnet = regression(convnet, optimizer='adam', learning_rate=LR, loss='categorical_crossentropy', name='targets')

model = tflearn.DNN(convnet, tensorboard_dir='log')

I am facing below issue

ModuleNotFoundError Traceback (most recent call last) <ipython-input-6-8507f364adee> in <module> ----> 1 import tflearn 2 from tflearn.layers.conv import conv_2d, max_pool_2d 3 from tflearn.layers.core import input_data, dropout, fully_connected 4 from tflearn.layers.estimator import regression 5

~\Anaconda3\Lib\site-packages\tflearn_init_.py in <module> 2 3 # Config ----> 4 from . import config 5 from .config import is_training, get_training_mode, init_graph 6

~\Anaconda3\Lib\site-packages\tflearn\config.py in <module> 3 import tensorflow as tf 4 ----> 5 from .variables import variable 6 7 # -------------------

~\Anaconda3\Lib\site-packages\tflearn\variables.py in <module> 5 import tflearn 6 ----> 7 from tensorflow.contrib.framework.python.ops import add_arg_scope as contrib_add_arg_scope 8 from tensorflow.python.framework import ops 9 from tensorflow.python.ops import variable_scope

ModuleNotFoundError: No module named 'tensorflow.contrib'

tensorflow/tensorflow

Answer questions pandrey-fr

You are welcome! Don't forget to close the issue :)

useful!

Related questions

Error occurred when finalizing GeneratorDataset iterator
ModuleNotFoundError: No module named 'tensorflow.contrib'
Lossy conversion from float32 to uint8. Range [0, 1]. Convert image to uint8 prior to saving to suppress this warning. hot 4
TF2.0 AutoGraph issue hot 4
When importing TensorFlow, error loading Hadoop hot 4
tensorflow2.0 detected 'xla_gpu' , but 'gpu' expected hot 3
The flag 'log_dir' is defined twice. hot 3
[TF 2.0] Dataset has no attribute 'make_one_shot_iterator' hot 3
ImportError: No module named 'tensorflow.tools' hot 3
Tensorflow 2.0 error when used via pyinstaller build - ImportError: cannot import name 'pywrap_tensorflow' from 'tensorflow_core.python' hot 3
Tf.Keras metrics issue hot 3
Error loading tensorflow hot 3
AttributeError: module 'tensorflow' has no attribute 'set_random_seed' hot 3
AttributeError: module &#39;tensorflow&#39; has no attribute &#39;Session&#39; hot 3
module 'tensorflow' has no attribute 'ConfigProto' hot 3
Github User Rank List