{
  "id": 182064,
  "title": "'EfficientNet' object has no attribute '_swish'",
  "url": "/competitions/landmark-recognition-2020/discussion/182064",
  "author_name": "sanjay bhargav danyamraju",
  "post_date": "2020-09-11T07:14:39.538000",
  "votes": 0,
  "comment_count": 6,
  "views": 0,
  "content": "<p>Can someone help me resolve this</p>",
  "messages": [
    {
      "id": 1006367,
      "postDate": "2020-09-11T07:58:17.973Z",
      "content": "<p>Not much to go on, but I guess we are talking about Keras/TF (?) and you are trying to load a saved model (?). Have seen similar in the past.<br>\nYou have to load the model with its custom objects, like this<br>\nload_model(model, custom_objects={<br>\n                '_swish': _swish}), since it's activations layer, otherwise you could have used compile = False to solve it.</p>\n<p>But you also need to specify the object before loading.</p>\n<p>Hope it leads you in the right direction and that it can help.</p>",
      "rawMarkdown": "Not much to go on, but I guess we are talking about Keras/TF (?) and you are trying to load a saved model (?). Have seen similar in the past.\nYou have to load the model with its custom objects, like this\nload_model(model, custom_objects={\n                '_swish': _swish}), since it's activations layer, otherwise you could have used compile = False to solve it.\n\nBut you also need to specify the object before loading.\n\nHope it leads you in the right direction and that it can help.",
      "votes": 1,
      "replies": [
        {
          "id": 1006387,
          "postDate": "2020-09-11T08:13:56.513Z",
          "content": "<p>Just tell if you need a code for a custom object, I can post a general swish custom object, maybe it can be a start to the solution even if one need the specific object to the specific model.</p>",
          "rawMarkdown": "Just tell if you need a code for a custom object, I can post a general swish custom object, maybe it can be a start to the solution even if one need the specific object to the specific model."
        },
        {
          "id": 1006462,
          "postDate": "2020-09-11T09:16:06.003Z",
          "content": "<p>yes please do <a href=\"https://www.kaggle.com/kirderf\" target=\"_blank\">@kirderf</a> </p>",
          "rawMarkdown": "yes please do @kirderf "
        },
        {
          "id": 1006465,
          "postDate": "2020-09-11T09:16:40.390Z",
          "content": "<p>I am loading model using torch</p>",
          "rawMarkdown": "I am loading model using torch"
        },
        {
          "id": 1006496,
          "postDate": "2020-09-11T09:45:32.047Z",
          "content": "<p>Sorry, haven't seen it with pytorch and can also be saved with torch.jit so more combinations to think of but if you post some more information what you are trying to do maybe it's easier for everyone to help. </p>",
          "rawMarkdown": "Sorry, haven't seen it with pytorch and can also be saved with torch.jit so more combinations to think of but if you post some more information what you are trying to do maybe it's easier for everyone to help. "
        },
        {
          "id": 1006500,
          "postDate": "2020-09-11T09:49:52.473Z",
          "rawMarkdown": "",
          "votes": -1,
          "isDeleted": true
        }
      ]
    },
    {
      "id": 1006320,
      "postDate": "2020-09-11T07:14:39.540Z",
      "content": "<p>Can someone help me resolve this</p>",
      "rawMarkdown": "Can someone help me resolve this"
    }
  ],
  "comments": [
    {
      "id": 1006367,
      "author_name": "Kirderf",
      "author_url": "",
      "post_date": "2020-09-11T07:58:17.973000",
      "content": "<p>Not much to go on, but I guess we are talking about Keras/TF (?) and you are trying to load a saved model (?). Have seen similar in the past.<br>\nYou have to load the model with its custom objects, like this<br>\nload_model(model, custom_objects={<br>\n                '_swish': _swish}), since it's activations layer, otherwise you could have used compile = False to solve it.</p>\n<p>But you also need to specify the object before loading.</p>\n<p>Hope it leads you in the right direction and that it can help.</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1006387,
          "author_name": "Kirderf",
          "author_url": "",
          "post_date": "2020-09-11T08:13:56.513000",
          "content": "<p>Just tell if you need a code for a custom object, I can post a general swish custom object, maybe it can be a start to the solution even if one need the specific object to the specific model.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1006462,
          "author_name": "sanjay bhargav danyamraju",
          "author_url": "",
          "post_date": "2020-09-11T09:16:06.003000",
          "content": "<p>yes please do <a href=\"https://www.kaggle.com/kirderf\" target=\"_blank\">@kirderf</a> </p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1006465,
          "author_name": "sanjay bhargav danyamraju",
          "author_url": "",
          "post_date": "2020-09-11T09:16:40.390000",
          "content": "<p>I am loading model using torch</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1006496,
          "author_name": "Kirderf",
          "author_url": "",
          "post_date": "2020-09-11T09:45:32.047000",
          "content": "<p>Sorry, haven't seen it with pytorch and can also be saved with torch.jit so more combinations to think of but if you post some more information what you are trying to do maybe it's easier for everyone to help. </p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1006500,
          "author_name": "",
          "author_url": "",
          "post_date": "2020-09-11T09:49:52.473000",
          "content": "",
          "votes": -1,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1006367": "Not much to go on, but I guess we are talking about Keras/TF (?) and you are trying to load a saved model (?). Have seen similar in the past.\nYou have to load the model with its custom objects, like this\nload_model(model, custom_objects={\n                '_swish': _swish}), since it's activations layer, otherwise you could have used compile = False to solve it.\n\nBut you also need to specify the object before loading.\n\nHope it leads you in the right direction and that it can help.",
    "1006320": "Can someone help me resolve this"
  }
}