我找不到解决此问题的方法:
from keras_contrib.layers import InstanceNormalization
ModuleNotFoundError: No module named 'keras_contrib'
我尝试执行:
!pip install keras_contrib
得到答复:
Requirement already satisfied: keras_contrib in /usr/local/lib/python3.6/dist-packages/keras_contrib-2.0.8-py3.6.egg (2.0.8)
Requirement already satisfied: keras in /usr/local/lib/python3.6/dist-packages (from keras_contrib) (2.2.4)
Requirement already satisfied: keras-preprocessing>=1.0.5 in /usr/local/lib/python3.6/dist-packages (from keras->keras_contrib) (1.0.9)
Requirement already satisfied: h5py in /usr/local/lib/python3.6/dist-packages (from keras->keras_contrib) (2.8.0)
Requirement already satisfied: scipy>=0.14 in /usr/local/lib/python3.6/dist-packages (from keras->keras_contrib) (1.1.0)
Requirement already satisfied: pyyaml in /usr/local/lib/python3.6/dist-packages (from keras->keras_contrib) (3.13)
Requirement already satisfied: keras-applications>=1.0.6 in /usr/local/lib/python3.6/dist-packages (from keras->keras_contrib) (1.0.7)
Requirement already satisfied: six>=1.9.0 in /usr/local/lib/python3.6/dist-packages (from keras->keras_contrib) (1.11.0)
Requirement already satisfied: numpy>=1.9.1 in /usr/local/lib/python3.6/dist-packages (from keras->keras_contrib) (1.14.6)
告诉我在哪里可以找到解决方案? 我使用google colab。
答案 0 :(得分:0)
您可以使用以下命令安装keras_contrib。
git clone https://www.github.com/keras-team/keras-contrib.git
cd keras-contrib
pip install git+https://www.github.com/keras-team/keras-contrib.git
答案 1 :(得分:-1)
此命令可以为您提供帮助:
pip install git+https://www.github.com/keras-team/keras-contrib.git