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 hot 7
tensorflow-gpu CUPTI errors
Error loading tensorflow
ModuleNotFoundError: No module named 'tensorflow.contrib'
module 'tensorflow' has no attribute 'ConfigProto'
TF 2.0 'Tensor' object has no attribute 'numpy' while using .numpy() although eager execution enabled by default
When importing TensorFlow, error loading Hadoop
AttributeError: module &#39;tensorflow.python.framework.op_def_registry&#39; has no attribute &#39;register_op_list&#39;
tf.keras.layers.Conv1DTranspose ?
[TF 2.0] tf.keras.optimizers.Adam hot 4
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
Tf.Keras metrics issue hot 4
ModuleNotFoundError: No module named 'tensorflow.examples.tutorials' hot 4
module 'tensorflow.python._pywrap_tensorflow_internal' has no attribute 'TFE_NewContextOptions' hot 4
Github User Rank List