I'm using tensorflow 1.0.0 and I want to access the tensorflow.layers module. The module seems to exist:
In [12]: dir(tensorflow.layers)
Out[12]:
['__builtins__',
'__doc__',
'__file__',
'__name__',
'__package__',
'_allowed_symbols',
'average_pooling1d',
'average_pooling2d',
'average_pooling3d',
'batch_normalization',
'conv1d',
'conv2d',
'conv2d_transpose',
'conv3d',
'dense',
'dropout',
'max_pooling1d',
'max_pooling2d',
'max_pooling3d',
'separable_conv2d']
But when I try to import e.g. the dense function:
In [13]: from tensorflow.layers import dense
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-13-e5b2c910300d> in <module>()
----> 1 from tensorflow.layers import dense
ImportError: No module named layers
Why can python not access the module?
Something is wrong with your installation or workspace:
pip install —upgrade —ignore-installed tensorflow)
print(tensorflow.__version__)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With