Open michael135 opened 2 years ago
I am also getting error for the notebook
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
c:\Projects\bluealtair\model_interpret\eli5\keras-image-classifiers.ipynb Cell 5' in <cell line: 2>()
[1](vscode-notebook-cell:/c%3A/Projects/bluealtair/model_interpret/eli5/keras-image-classifiers.ipynb#ch0000061?line=0) from tensorflow import keras
----> [2](vscode-notebook-cell:/c%3A/Projects/bluealtair/model_interpret/eli5/keras-image-classifiers.ipynb#ch0000061?line=1) from keras.applications import mobilenet_v2
File c:\Users\Parth.chokhra\Miniconda3\lib\site-packages\keras\__init__.py:4, in <module>
[1](file:///c%3A/Users/Parth.chokhra/Miniconda3/lib/site-packages/keras/__init__.py?line=0) from __future__ import absolute_import
[3](file:///c%3A/Users/Parth.chokhra/Miniconda3/lib/site-packages/keras/__init__.py?line=2) from . import utils
----> [4](file:///c%3A/Users/Parth.chokhra/Miniconda3/lib/site-packages/keras/__init__.py?line=3) from . import activations
[5](file:///c%3A/Users/Parth.chokhra/Miniconda3/lib/site-packages/keras/__init__.py?line=4) from . import applications
[6](file:///c%3A/Users/Parth.chokhra/Miniconda3/lib/site-packages/keras/__init__.py?line=5) from . import backend
File c:\Users\Parth.chokhra\Miniconda3\lib\site-packages\keras\activations.py:6, in <module>
[4](file:///c%3A/Users/Parth.chokhra/Miniconda3/lib/site-packages/keras/activations.py?line=3) from . import backend as K
[5](file:///c%3A/Users/Parth.chokhra/Miniconda3/lib/site-packages/keras/activations.py?line=4) from .utils.generic_utils import deserialize_keras_object
----> [6](file:///c%3A/Users/Parth.chokhra/Miniconda3/lib/site-packages/keras/activations.py?line=5) from .engine import Layer
[9](file:///c%3A/Users/Parth.chokhra/Miniconda3/lib/site-packages/keras/activations.py?line=8) def softmax(x, axis=-1):
[10](file:///c%3A/Users/Parth.chokhra/Miniconda3/lib/site-packages/keras/activations.py?line=9) """Softmax activation function.
[11](file:///c%3A/Users/Parth.chokhra/Miniconda3/lib/site-packages/keras/activations.py?line=10)
[12](file:///c%3A/Users/Parth.chokhra/Miniconda3/lib/site-packages/keras/activations.py?line=11) # Arguments
(...)
[20](file:///c%3A/Users/Parth.chokhra/Miniconda3/lib/site-packages/keras/activations.py?line=19) ValueError: In case `dim(x) == 1`.
[21](file:///c%3A/Users/Parth.chokhra/Miniconda3/lib/site-packages/keras/activations.py?line=20) """
File c:\Users\Parth.chokhra\Miniconda3\lib\site-packages\keras\engine\__init__.py:8, in <module>
[6](file:///c%3A/Users/Parth.chokhra/Miniconda3/lib/site-packages/keras/engine/__init__.py?line=5) from .topology import Layer
[7](file:///c%3A/Users/Parth.chokhra/Miniconda3/lib/site-packages/keras/engine/__init__.py?line=6) from .topology import get_source_inputs
----> [8](file:///c%3A/Users/Parth.chokhra/Miniconda3/lib/site-packages/keras/engine/__init__.py?line=7) from .training import Model
File c:\Users\Parth.chokhra\Miniconda3\lib\site-packages\keras\engine\training.py:25, in <module>
[23](file:///c%3A/Users/Parth.chokhra/Miniconda3/lib/site-packages/keras/engine/training.py?line=22) from .. import metrics as metrics_module
[24](file:///c%3A/Users/Parth.chokhra/Miniconda3/lib/site-packages/keras/engine/training.py?line=23) from ..utils.generic_utils import Progbar
---> [25](file:///c%3A/Users/Parth.chokhra/Miniconda3/lib/site-packages/keras/engine/training.py?line=24) from .. import callbacks as cbks
[26](file:///c%3A/Users/Parth.chokhra/Miniconda3/lib/site-packages/keras/engine/training.py?line=25) from ..legacy import interfaces
[29](file:///c%3A/Users/Parth.chokhra/Miniconda3/lib/site-packages/keras/engine/training.py?line=28) def _standardize_input_data(data, names, shapes=None,
[30](file:///c%3A/Users/Parth.chokhra/Miniconda3/lib/site-packages/keras/engine/training.py?line=29) check_batch_axis=True,
[31](file:///c%3A/Users/Parth.chokhra/Miniconda3/lib/site-packages/keras/engine/training.py?line=30) exception_prefix=''):
File c:\Users\Parth.chokhra\Miniconda3\lib\site-packages\keras\callbacks.py:26, in <module>
[24](file:///c%3A/Users/Parth.chokhra/Miniconda3/lib/site-packages/keras/callbacks.py?line=23) if K.backend() == 'tensorflow':
[25](file:///c%3A/Users/Parth.chokhra/Miniconda3/lib/site-packages/keras/callbacks.py?line=24) import tensorflow as tf
---> [26](file:///c%3A/Users/Parth.chokhra/Miniconda3/lib/site-packages/keras/callbacks.py?line=25) from tensorflow.contrib.tensorboard.plugins import projector
[29](file:///c%3A/Users/Parth.chokhra/Miniconda3/lib/site-packages/keras/callbacks.py?line=28) class CallbackList(object):
[30](file:///c%3A/Users/Parth.chokhra/Miniconda3/lib/site-packages/keras/callbacks.py?line=29) """Container abstracting a list of callbacks.
[31](file:///c%3A/Users/Parth.chokhra/Miniconda3/lib/site-packages/keras/callbacks.py?line=30)
[32](file:///c%3A/Users/Parth.chokhra/Miniconda3/lib/site-packages/keras/callbacks.py?line=31) # Arguments
(...)
[35](file:///c%3A/Users/Parth.chokhra/Miniconda3/lib/site-packages/keras/callbacks.py?line=34) running statistics over callback execution time.
[36](file:///c%3A/Users/Parth.chokhra/Miniconda3/lib/site-packages/keras/callbacks.py?line=35) """
ModuleNotFoundError: No module named 'tensorflow.contrib'
I've tried to reimporduce steps in: https://eli5.readthedocs.io/en/latest/tutorials/keras-image-classifiers.html
But after running:
I've got the following error:
It seems, that there is some issue with Tensorflow 2.+, So I've tried to fix it by turning off Eager execution:
But I've got another error: