{
  "id": 215870,
  "title": "Help regarding inference time using efficientnet library (keras)",
  "url": "/competitions/cassava-leaf-disease-classification/discussion/215870",
  "author_name": "Mohneesh_Sreegirisetty",
  "post_date": "2021-01-31T15:06:08.442000",
  "votes": 0,
  "comment_count": 20,
  "views": 0,
  "content": "<p>Hello,<br>\nSo I am using the efficientnet library to use the noisy-student weights to train my model.<br>\nlike this:</p>\n<pre><code>!pip install efficientnet\nAnd then\nbase_model = efn.EfficientNetB4(weights='noisy-student')\n</code></pre>\n<p>I am getting proper training and validation accuracies.<br>\nThe problem is that I save this model and load it in another notebook for inference, The prediction from this model is always <strong>[[nan, nan, nan, nan, nan]]</strong>, and the prediction is going to <strong>[0]</strong> always. I don't know what I am doing wrong, there are no issues in its GitHub regarding this as well.</p>",
  "messages": [
    {
      "id": 1179946,
      "postDate": "2021-02-01T02:23:37.560Z",
      "content": "<p>Due to mixed precision in training version 14, a certain x * y = &gt; float16 * float32 in the code is illegal, so there is an error. If the performance is not considered, you can choose to comment out .</p>\n<h1>policy = mixed_ precision.Policy ('mixed_ float16')</h1>\n<h1>mixed_ precision.set_ policy(policy)</h1>",
      "rawMarkdown": "Due to mixed precision in training version 14, a certain x * y = > float16 * float32 in the code is illegal, so there is an error. If the performance is not considered, you can choose to comment out .\n# policy = mixed_ precision.Policy ('mixed_ float16')\n#mixed_ precision.set_ policy(policy)",
      "votes": 1,
      "replies": [
        {
          "id": 1180158,
          "postDate": "2021-02-01T06:10:33.017Z",
          "content": "<p>In the new version 15, I have set it right. its working fine it ended due to kaggle's restraint of 9hrs.<br>\nAnd the performance increase is good so I would like to keep this.</p>",
          "rawMarkdown": "In the new version 15, I have set it right. its working fine it ended due to kaggle's restraint of 9hrs.\nAnd the performance increase is good so I would like to keep this."
        }
      ]
    },
    {
      "id": 1179853,
      "postDate": "2021-01-31T22:23:28.123Z",
      "content": "<p>Just looked at your training kernel - the version now being shared (Version 14) has fatal errors.</p>\n<p>Since you are using mixed precision you should modify the last bit of the model build for each.  This looks like a recent change compared to last successful run on Version 10.</p>\n<p>**Update:  adding dtype = …. fixes the issue discussed by zhangeng **</p>\n<p><code>model.add(Dense(n_CLASS, activation = 'softmax', dtype = 'float32')))</code></p>\n<p>I will make that change and fork the training kernel.  Will run with epochs of 1 to see if that fixes the error.</p>",
      "rawMarkdown": "Just looked at your training kernel - the version now being shared (Version 14) has fatal errors.\n\nSince you are using mixed precision you should modify the last bit of the model build for each.  This looks like a recent change compared to last successful run on Version 10.\n\n**Update:  adding dtype = .... fixes the issue discussed by zhangeng **\n\n`model.add(Dense(n_CLASS, activation = 'softmax', dtype = 'float32')))`\n\nI will make that change and fork the training kernel.  Will run with epochs of 1 to see if that fixes the error.",
      "votes": 1,
      "replies": [
        {
          "id": 1179881,
          "postDate": "2021-01-31T23:32:12.647Z",
          "content": "<p>Training ran ok for 1 epoch with the above changes to your different models.</p>\n<p>The output of 0 suggests that your model is not really being loaded - likely the folder address is wrong.  I could not actually run the prediction kernel since you made the various whl private.</p>\n<p>Getting folder addresses correct can get messy in kaggle - I always copy and paste the address of added data - anytime I think I can type it I get it wrong.  </p>",
          "rawMarkdown": "Training ran ok for 1 epoch with the above changes to your different models.\n\nThe output of 0 suggests that your model is not really being loaded - likely the folder address is wrong.  I could not actually run the prediction kernel since you made the various whl private.\n\nGetting folder addresses correct can get messy in kaggle - I always copy and paste the address of added data - anytime I think I can type it I get it wrong.  "
        },
        {
          "id": 1180157,
          "postDate": "2021-02-01T06:09:28.567Z",
          "content": "<p>Yes The kernel gave this error and I wrote float32 in the final softmax layer to remove this error. The new version 15 which stopped after 9 hours is running fine it stopped due to kaggle's restraint of 9hrs. It had no fatal errors. I think the error is in the submission notebook somewhere. Maybe I will try to delete the dataset and create it again and check whether it improves my situation(the path is also copied, I never enter it by hand because of the confusion.)</p>\n<p>Thank you for the help by the way.</p>",
          "rawMarkdown": "Yes The kernel gave this error and I wrote float32 in the final softmax layer to remove this error. The new version 15 which stopped after 9 hours is running fine it stopped due to kaggle's restraint of 9hrs. It had no fatal errors. I think the error is in the submission notebook somewhere. Maybe I will try to delete the dataset and create it again and check whether it improves my situation(the path is also copied, I never enter it by hand because of the confusion.)\n\nThank you for the help by the way."
        },
        {
          "id": 1180383,
          "postDate": "2021-02-01T08:25:25.503Z",
          "content": "<p>OK - you got me a little confused.  Your training version 15 ran for 9 hours - right?</p>\n<p>I can't look at 15 - but looking at 16 - one obvious thing to change that will improve speed a bunch.</p>\n<p>Change the batch_size from 8 - try 24 it might work.   </p>\n<p>Minor thing to help speed - you don't need to shuffle the validation set.  </p>",
          "rawMarkdown": "OK - you got me a little confused.  Your training version 15 ran for 9 hours - right?\n\nI can't look at 15 - but looking at 16 - one obvious thing to change that will improve speed a bunch.\n\nChange the batch_size from 8 - try 24 it might work.   \n\nMinor thing to help speed - you don't need to shuffle the validation set.  ",
          "votes": 1
        },
        {
          "id": 1180492,
          "postDate": "2021-02-01T09:41:03.513Z",
          "content": "<p>Ok thank you, The version 16 is me trying out something new which I started doing now.</p>",
          "rawMarkdown": "Ok thank you, The version 16 is me trying out something new which I started doing now."
        }
      ]
    },
    {
      "id": 1179442,
      "postDate": "2021-01-31T15:14:29.873Z",
      "content": "<p>Hello! </p>\n<p>According to the competition rules, all inference notebooks must have the internet connection turned off. So how do you import the <code>efficientnet</code> library to your inference notebook?</p>",
      "rawMarkdown": "Hello! \n\nAccording to the competition rules, all inference notebooks must have the internet connection turned off. So how do you import the `efficientnet` library to your inference notebook?",
      "votes": 1,
      "replies": [
        {
          "id": 1179491,
          "postDate": "2021-01-31T15:36:44.127Z",
          "content": "<p>yes, I have downloaded the required files .whl files and stored it in a dataset, am installing them in my inference notebook from there. The imports is fine, just the prediction comes out weird. </p>",
          "rawMarkdown": "yes, I have downloaded the required files .whl files and stored it in a dataset, am installing them in my inference notebook from there. The imports is fine, just the prediction comes out weird. "
        },
        {
          "id": 1179516,
          "postDate": "2021-01-31T15:49:30.817Z",
          "content": "<p>That's weird. <br>\nHowever, if you don't mind sharing, I can take a look at your code.</p>",
          "rawMarkdown": "That's weird. \nHowever, if you don't mind sharing, I can take a look at your code.",
          "votes": 1
        },
        {
          "id": 1179606,
          "postDate": "2021-01-31T17:10:15.160Z",
          "content": "<p><a href=\"https://www.kaggle.com/mohneesh7/cassava-leaf-disease-detection-keras\" target=\"_blank\">Training</a><br>\n<a href=\"https://www.kaggle.com/mohneesh7/submission-notebook-for-cassava\" target=\"_blank\">Submission</a></p>",
          "rawMarkdown": "[Training](https://www.kaggle.com/mohneesh7/cassava-leaf-disease-detection-keras)\n[Submission](https://www.kaggle.com/mohneesh7/submission-notebook-for-cassava)"
        },
        {
          "id": 1179659,
          "postDate": "2021-01-31T17:50:22.113Z",
          "rawMarkdown": "",
          "isDeleted": true
        },
        {
          "id": 1179709,
          "postDate": "2021-01-31T18:40:30.423Z",
          "content": "<p>Forked them both and don't see any fatal mistake: the training notebook seems to work fine (I've called model <code>predict</code> and it produced no NaNs), replacing your model with my model in the submission notebook also works as expected (also no NaNs). </p>\n<p>The only idea is that your notebook has exceeded the runtime with all the outputs being saved only by the <code>ModelCheckpoint</code> callback. I'd suggest running your model for just one epoch and saving&amp;loading it into the submission notebook again to make sure there's no mistake. If that works fine (like for me) then the error is due to exceeding the runtime.</p>\n<p>P.S. I'd suggest removing the <code>Flatten</code> layer after the <code>GlobalAveragePooling2D</code> layer as it carries no sense, and normalizing the images because lack of normalization would greatly affect the model's performance.</p>",
          "rawMarkdown": "Forked them both and don't see any fatal mistake: the training notebook seems to work fine (I've called model `predict` and it produced no NaNs), replacing your model with my model in the submission notebook also works as expected (also no NaNs). \n\nThe only idea is that your notebook has exceeded the runtime with all the outputs being saved only by the `ModelCheckpoint` callback. I'd suggest running your model for just one epoch and saving&loading it into the submission notebook again to make sure there's no mistake. If that works fine (like for me) then the error is due to exceeding the runtime.\n\nP.S. I'd suggest removing the `Flatten` layer after the `GlobalAveragePooling2D` layer as it carries no sense, and normalizing the images because lack of normalization would greatly affect the model's performance.",
          "votes": 1
        },
        {
          "id": 1180154,
          "postDate": "2021-02-01T06:05:26.543Z",
          "content": "<p>OK i will try to do all these measures, but I have one doubt, the normalization is don't in efficientnet layers itself right, is there any need of explicit normalization?</p>",
          "rawMarkdown": "OK i will try to do all these measures, but I have one doubt, the normalization is don't in efficientnet layers itself right, is there any need of explicit normalization?"
        },
        {
          "id": 1180238,
          "postDate": "2021-02-01T07:06:20.583Z",
          "content": "<p>This is only happening with the noisy student weights, imagenet weights seems fine.</p>",
          "rawMarkdown": "This is only happening with the noisy student weights, imagenet weights seems fine."
        },
        {
          "id": 1180250,
          "postDate": "2021-02-01T07:25:22.500Z",
          "content": "<p>As far as I'm concerned, there are no normalization layers in EfficientNets (except <code>BatchNormalization</code>, which is not the case). It's also a good practice to always normalize your input. This can be done either by placing a <code>tf.keras.layers.experimental.preprocessing.Rescaling(1 / 255.)</code> layer just after your <code>Input</code> layer, with Sklearn's <code>MinMaxScaler</code> class or simply by hand dividing.</p>",
          "rawMarkdown": "As far as I'm concerned, there are no normalization layers in EfficientNets (except `BatchNormalization`, which is not the case). It's also a good practice to always normalize your input. This can be done either by placing a `tf.keras.layers.experimental.preprocessing.Rescaling(1 / 255.)` layer just after your `Input` layer, with Sklearn's `MinMaxScaler` class or simply by hand dividing."
        },
        {
          "id": 1180257,
          "postDate": "2021-02-01T07:28:18.933Z",
          "content": "<p>If so, I'd suggest changing your source code - there sure must be a mistake. As for me, I'm importing <strong><a href=\"https://www.kaggle.com/awsaf49/efficientnet-keras-dataset\" target=\"_blank\">this dataset</a></strong> to both training and inference notebooks and add <code>sys.path.append('/kaggle/input/efficientnet-keras-dataset/efficientnet_kaggle')</code> <br>\nline to the top of my notebook (<code>efficientnet.tfkeras</code> can then be imported just as usual)</p>",
          "rawMarkdown": "If so, I'd suggest changing your source code - there sure must be a mistake. As for me, I'm importing **[this dataset](https://www.kaggle.com/awsaf49/efficientnet-keras-dataset)** to both training and inference notebooks and add `sys.path.append('/kaggle/input/efficientnet-keras-dataset/efficientnet_kaggle')` \nline to the top of my notebook (`efficientnet.tfkeras` can then be imported just as usual)"
        },
        {
          "id": 1181092,
          "postDate": "2021-02-01T16:37:00.207Z",
          "content": "<p><a href=\"https://keras.io/examples/vision/image_classification_efficientnet_fine_tuning/\" target=\"_blank\">https://keras.io/examples/vision/image_classification_efficientnet_fine_tuning/</a></p>\n<p>Here they say Normalization is inbuilt.</p>",
          "rawMarkdown": "https://keras.io/examples/vision/image_classification_efficientnet_fine_tuning/\n\nHere they say Normalization is inbuilt."
        },
        {
          "id": 1181151,
          "postDate": "2021-02-01T17:24:17.597Z",
          "rawMarkdown": "",
          "isDeleted": true
        },
        {
          "id": 1181152,
          "postDate": "2021-02-01T17:24:17.597Z",
          "content": "<p>There are two major versions of efficientnet's - I believe that the version your downloading does need normalization - but not 100% sure.</p>\n<p>hmmmm - going to be one of those days - I got two comments posted when I hit the go button - I need more coffee or kaggle needs more coffee.</p>",
          "rawMarkdown": "There are two major versions of efficientnet's - I believe that the version your downloading does need normalization - but not 100% sure.\n\n\nhmmmm - going to be one of those days - I got two comments posted when I hit the go button - I need more coffee or kaggle needs more coffee."
        }
      ]
    },
    {
      "id": 1179434,
      "postDate": "2021-01-31T15:06:08.443Z",
      "content": "<p>Hello,<br>\nSo I am using the efficientnet library to use the noisy-student weights to train my model.<br>\nlike this:</p>\n<pre><code>!pip install efficientnet\nAnd then\nbase_model = efn.EfficientNetB4(weights='noisy-student')\n</code></pre>\n<p>I am getting proper training and validation accuracies.<br>\nThe problem is that I save this model and load it in another notebook for inference, The prediction from this model is always <strong>[[nan, nan, nan, nan, nan]]</strong>, and the prediction is going to <strong>[0]</strong> always. I don't know what I am doing wrong, there are no issues in its GitHub regarding this as well.</p>",
      "rawMarkdown": "Hello,\nSo I am using the efficientnet library to use the noisy-student weights to train my model.\nlike this:\n```\n!pip install efficientnet\nAnd then\nbase_model = efn.EfficientNetB4(weights='noisy-student')\n```\nI am getting proper training and validation accuracies.\nThe problem is that I save this model and load it in another notebook for inference, The prediction from this model is always **[[nan, nan, nan, nan, nan]]**, and the prediction is going to **[0]** always. I don't know what I am doing wrong, there are no issues in its GitHub regarding this as well."
    }
  ],
  "comments": [
    {
      "id": 1179946,
      "author_name": "zhangeng",
      "author_url": "",
      "post_date": "2021-02-01T02:23:37.560000",
      "content": "<p>Due to mixed precision in training version 14, a certain x * y = &gt; float16 * float32 in the code is illegal, so there is an error. If the performance is not considered, you can choose to comment out .</p>\n<h1>policy = mixed_ precision.Policy ('mixed_ float16')</h1>\n<h1>mixed_ precision.set_ policy(policy)</h1>",
      "votes": 1,
      "replies": [
        {
          "id": 1180158,
          "author_name": "Mohneesh_Sreegirisetty",
          "author_url": "",
          "post_date": "2021-02-01T06:10:33.017000",
          "content": "<p>In the new version 15, I have set it right. its working fine it ended due to kaggle's restraint of 9hrs.<br>\nAnd the performance increase is good so I would like to keep this.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1179853,
      "author_name": "PC Jimmmy",
      "author_url": "",
      "post_date": "2021-01-31T22:23:28.123000",
      "content": "<p>Just looked at your training kernel - the version now being shared (Version 14) has fatal errors.</p>\n<p>Since you are using mixed precision you should modify the last bit of the model build for each.  This looks like a recent change compared to last successful run on Version 10.</p>\n<p>**Update:  adding dtype = …. fixes the issue discussed by zhangeng **</p>\n<p><code>model.add(Dense(n_CLASS, activation = 'softmax', dtype = 'float32')))</code></p>\n<p>I will make that change and fork the training kernel.  Will run with epochs of 1 to see if that fixes the error.</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1179881,
          "author_name": "PC Jimmmy",
          "author_url": "",
          "post_date": "2021-01-31T23:32:12.647000",
          "content": "<p>Training ran ok for 1 epoch with the above changes to your different models.</p>\n<p>The output of 0 suggests that your model is not really being loaded - likely the folder address is wrong.  I could not actually run the prediction kernel since you made the various whl private.</p>\n<p>Getting folder addresses correct can get messy in kaggle - I always copy and paste the address of added data - anytime I think I can type it I get it wrong.  </p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1180157,
          "author_name": "Mohneesh_Sreegirisetty",
          "author_url": "",
          "post_date": "2021-02-01T06:09:28.567000",
          "content": "<p>Yes The kernel gave this error and I wrote float32 in the final softmax layer to remove this error. The new version 15 which stopped after 9 hours is running fine it stopped due to kaggle's restraint of 9hrs. It had no fatal errors. I think the error is in the submission notebook somewhere. Maybe I will try to delete the dataset and create it again and check whether it improves my situation(the path is also copied, I never enter it by hand because of the confusion.)</p>\n<p>Thank you for the help by the way.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1180383,
          "author_name": "PC Jimmmy",
          "author_url": "",
          "post_date": "2021-02-01T08:25:25.503000",
          "content": "<p>OK - you got me a little confused.  Your training version 15 ran for 9 hours - right?</p>\n<p>I can't look at 15 - but looking at 16 - one obvious thing to change that will improve speed a bunch.</p>\n<p>Change the batch_size from 8 - try 24 it might work.   </p>\n<p>Minor thing to help speed - you don't need to shuffle the validation set.  </p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1180492,
          "author_name": "Mohneesh_Sreegirisetty",
          "author_url": "",
          "post_date": "2021-02-01T09:41:03.513000",
          "content": "<p>Ok thank you, The version 16 is me trying out something new which I started doing now.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1179442,
      "author_name": "Nikita Kuzmenkov",
      "author_url": "",
      "post_date": "2021-01-31T15:14:29.873000",
      "content": "<p>Hello! </p>\n<p>According to the competition rules, all inference notebooks must have the internet connection turned off. So how do you import the <code>efficientnet</code> library to your inference notebook?</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1179491,
          "author_name": "Mohneesh_Sreegirisetty",
          "author_url": "",
          "post_date": "2021-01-31T15:36:44.127000",
          "content": "<p>yes, I have downloaded the required files .whl files and stored it in a dataset, am installing them in my inference notebook from there. The imports is fine, just the prediction comes out weird. </p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1179516,
          "author_name": "Nikita Kuzmenkov",
          "author_url": "",
          "post_date": "2021-01-31T15:49:30.817000",
          "content": "<p>That's weird. <br>\nHowever, if you don't mind sharing, I can take a look at your code.</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1179606,
          "author_name": "Mohneesh_Sreegirisetty",
          "author_url": "",
          "post_date": "2021-01-31T17:10:15.160000",
          "content": "<p><a href=\"https://www.kaggle.com/mohneesh7/cassava-leaf-disease-detection-keras\" target=\"_blank\">Training</a><br>\n<a href=\"https://www.kaggle.com/mohneesh7/submission-notebook-for-cassava\" target=\"_blank\">Submission</a></p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1179659,
          "author_name": "",
          "author_url": "",
          "post_date": "2021-01-31T17:50:22.113000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1179709,
          "author_name": "Nikita Kuzmenkov",
          "author_url": "",
          "post_date": "2021-01-31T18:40:30.423000",
          "content": "<p>Forked them both and don't see any fatal mistake: the training notebook seems to work fine (I've called model <code>predict</code> and it produced no NaNs), replacing your model with my model in the submission notebook also works as expected (also no NaNs). </p>\n<p>The only idea is that your notebook has exceeded the runtime with all the outputs being saved only by the <code>ModelCheckpoint</code> callback. I'd suggest running your model for just one epoch and saving&amp;loading it into the submission notebook again to make sure there's no mistake. If that works fine (like for me) then the error is due to exceeding the runtime.</p>\n<p>P.S. I'd suggest removing the <code>Flatten</code> layer after the <code>GlobalAveragePooling2D</code> layer as it carries no sense, and normalizing the images because lack of normalization would greatly affect the model's performance.</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1180154,
          "author_name": "Mohneesh_Sreegirisetty",
          "author_url": "",
          "post_date": "2021-02-01T06:05:26.543000",
          "content": "<p>OK i will try to do all these measures, but I have one doubt, the normalization is don't in efficientnet layers itself right, is there any need of explicit normalization?</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1180238,
          "author_name": "Mohneesh_Sreegirisetty",
          "author_url": "",
          "post_date": "2021-02-01T07:06:20.583000",
          "content": "<p>This is only happening with the noisy student weights, imagenet weights seems fine.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1180250,
          "author_name": "Nikita Kuzmenkov",
          "author_url": "",
          "post_date": "2021-02-01T07:25:22.500000",
          "content": "<p>As far as I'm concerned, there are no normalization layers in EfficientNets (except <code>BatchNormalization</code>, which is not the case). It's also a good practice to always normalize your input. This can be done either by placing a <code>tf.keras.layers.experimental.preprocessing.Rescaling(1 / 255.)</code> layer just after your <code>Input</code> layer, with Sklearn's <code>MinMaxScaler</code> class or simply by hand dividing.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1180257,
          "author_name": "Nikita Kuzmenkov",
          "author_url": "",
          "post_date": "2021-02-01T07:28:18.933000",
          "content": "<p>If so, I'd suggest changing your source code - there sure must be a mistake. As for me, I'm importing <strong><a href=\"https://www.kaggle.com/awsaf49/efficientnet-keras-dataset\" target=\"_blank\">this dataset</a></strong> to both training and inference notebooks and add <code>sys.path.append('/kaggle/input/efficientnet-keras-dataset/efficientnet_kaggle')</code> <br>\nline to the top of my notebook (<code>efficientnet.tfkeras</code> can then be imported just as usual)</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1181092,
          "author_name": "Mohneesh_Sreegirisetty",
          "author_url": "",
          "post_date": "2021-02-01T16:37:00.207000",
          "content": "<p><a href=\"https://keras.io/examples/vision/image_classification_efficientnet_fine_tuning/\" target=\"_blank\">https://keras.io/examples/vision/image_classification_efficientnet_fine_tuning/</a></p>\n<p>Here they say Normalization is inbuilt.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1181151,
          "author_name": "",
          "author_url": "",
          "post_date": "2021-02-01T17:24:17.597000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1181152,
          "author_name": "PC Jimmmy",
          "author_url": "",
          "post_date": "2021-02-01T17:24:17.597000",
          "content": "<p>There are two major versions of efficientnet's - I believe that the version your downloading does need normalization - but not 100% sure.</p>\n<p>hmmmm - going to be one of those days - I got two comments posted when I hit the go button - I need more coffee or kaggle needs more coffee.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1179946": "Due to mixed precision in training version 14, a certain x * y = > float16 * float32 in the code is illegal, so there is an error. If the performance is not considered, you can choose to comment out .\n# policy = mixed_ precision.Policy ('mixed_ float16')\n#mixed_ precision.set_ policy(policy)",
    "1179853": "Just looked at your training kernel - the version now being shared (Version 14) has fatal errors.\n\nSince you are using mixed precision you should modify the last bit of the model build for each.  This looks like a recent change compared to last successful run on Version 10.\n\n**Update:  adding dtype = .... fixes the issue discussed by zhangeng **\n\n`model.add(Dense(n_CLASS, activation = 'softmax', dtype = 'float32')))`\n\nI will make that change and fork the training kernel.  Will run with epochs of 1 to see if that fixes the error.",
    "1179442": "Hello! \n\nAccording to the competition rules, all inference notebooks must have the internet connection turned off. So how do you import the `efficientnet` library to your inference notebook?",
    "1179434": "Hello,\nSo I am using the efficientnet library to use the noisy-student weights to train my model.\nlike this:\n```\n!pip install efficientnet\nAnd then\nbase_model = efn.EfficientNetB4(weights='noisy-student')\n```\nI am getting proper training and validation accuracies.\nThe problem is that I save this model and load it in another notebook for inference, The prediction from this model is always **[[nan, nan, nan, nan, nan]]**, and the prediction is going to **[0]** always. I don't know what I am doing wrong, there are no issues in its GitHub regarding this as well."
  }
}