{
  "id": 310652,
  "title": "How to install keras_contrib from inside kaggle notebook",
  "url": "/competitions/gan-getting-started/discussion/310652",
  "author_name": "Nandita Bhattacharya",
  "post_date": "2022-03-02T09:46:44.289000",
  "votes": 2,
  "comment_count": 0,
  "views": 0,
  "content": "<p>Hi, <br>\nI am trying to import the following:<br>\nfrom keras_contrib.layers.normalization.instancenormalization import InstanceNormalization<br>\nand getting the error No module named 'keras_contrib'</p>\n<p>I tried to intsall it using the following commands:<br>\n!sudo pip install git+<a href=\"https://www.github.com/keras-team/keras-contrib.git\" target=\"_blank\">https://www.github.com/keras-team/keras-contrib.git</a><br>\n!git clone <a href=\"https://www.github.com/keras-team/keras-contrib.git\" target=\"_blank\">https://www.github.com/keras-team/keras-contrib.git</a><br>\n!python keras-contrib/convert_to_tf_keras.py<br>\n!USE_TF_KERAS=1 python keras-contrib/setup.py install<br>\n!pip uninstall tf_keras_contrib -y</p>\n<p>These commands could successfully install the package but still getting the same error while importing.</p>\n<p>Please suggest what am I missing here. Thanks in advance!</p>",
  "messages": [
    {
      "id": 1709557,
      "postDate": "2022-03-02T09:46:44.290Z",
      "content": "<p>Hi, <br>\nI am trying to import the following:<br>\nfrom keras_contrib.layers.normalization.instancenormalization import InstanceNormalization<br>\nand getting the error No module named 'keras_contrib'</p>\n<p>I tried to intsall it using the following commands:<br>\n!sudo pip install git+<a href=\"https://www.github.com/keras-team/keras-contrib.git\" target=\"_blank\">https://www.github.com/keras-team/keras-contrib.git</a><br>\n!git clone <a href=\"https://www.github.com/keras-team/keras-contrib.git\" target=\"_blank\">https://www.github.com/keras-team/keras-contrib.git</a><br>\n!python keras-contrib/convert_to_tf_keras.py<br>\n!USE_TF_KERAS=1 python keras-contrib/setup.py install<br>\n!pip uninstall tf_keras_contrib -y</p>\n<p>These commands could successfully install the package but still getting the same error while importing.</p>\n<p>Please suggest what am I missing here. Thanks in advance!</p>",
      "rawMarkdown": "Hi, \nI am trying to import the following:\nfrom keras_contrib.layers.normalization.instancenormalization import InstanceNormalization\nand getting the error No module named 'keras_contrib'\n\nI tried to intsall it using the following commands:\n!sudo pip install git+https://www.github.com/keras-team/keras-contrib.git\n!git clone https://www.github.com/keras-team/keras-contrib.git\n!python keras-contrib/convert_to_tf_keras.py\n!USE_TF_KERAS=1 python keras-contrib/setup.py install\n!pip uninstall tf_keras_contrib -y\n\nThese commands could successfully install the package but still getting the same error while importing.\n\nPlease suggest what am I missing here. Thanks in advance!",
      "votes": 2
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "1709557": "Hi, \nI am trying to import the following:\nfrom keras_contrib.layers.normalization.instancenormalization import InstanceNormalization\nand getting the error No module named 'keras_contrib'\n\nI tried to intsall it using the following commands:\n!sudo pip install git+https://www.github.com/keras-team/keras-contrib.git\n!git clone https://www.github.com/keras-team/keras-contrib.git\n!python keras-contrib/convert_to_tf_keras.py\n!USE_TF_KERAS=1 python keras-contrib/setup.py install\n!pip uninstall tf_keras_contrib -y\n\nThese commands could successfully install the package but still getting the same error while importing.\n\nPlease suggest what am I missing here. Thanks in advance!"
  }
}