{
  "id": 201278,
  "title": "Any idea why it is taking like 30 mins to just run first epoch",
  "url": "/competitions/cassava-leaf-disease-classification/discussion/201278",
  "author_name": "",
  "post_date": "2020-12-04T01:06:56.218822100Z",
  "votes": null,
  "comment_count": 2,
  "views": 0,
  "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3245919%2Fe7fdbde14e1c8747cc577c9169ede34a%2FScreen%20Shot%202020-12-03%20at%205.04.42%20PM.png?generation=1607043900661795&amp;alt=media\" alt=\"\"></p>\n<p>i am using a standard densenet201 </p>\n<p>```   pretrained_model = tf.keras.applications.DenseNet201(input_shape=(IMAGE_SIZE[0], IMAGE_SIZE[1], 3),weights='imagenet', include_top=False)</p>\n<pre><code>    #pretrained_model.trainable = False # False = transfer learning, True = fine-tuning\n    pretrained_model.trainable = True\n    model = tf.keras.Sequential([\n        #img_adjust_layer,\n        pretrained_model,\n        tf.keras.layers.GlobalAveragePooling2D(),\n        tf.keras.layers.Dense(64,activation='relu' ,kernel_regularizer=regularizers.l2(0.003) ),\n        #tf.keras.layers.Dropout(0.5),\n        tf.keras.layers.Dense(len(CLASSES), activation='softmax',dtype='float32')\n    ])\n</code></pre>\n<p>```</p>\n<p>i added a l2 regularizer as my model is overfitting . I am using this dataset <br>\ni am trying to use <a href=\"https://www.kaggle.com/kingofarmy/cassavapreprocessed\" target=\"_blank\">https://www.kaggle.com/kingofarmy/cassavapreprocessed</a> </p>",
  "messages": [
    {
      "id": "1101515",
      "postDate": "12/04/2020 01:06:56",
      "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3245919%2Fe7fdbde14e1c8747cc577c9169ede34a%2FScreen%20Shot%202020-12-03%20at%205.04.42%20PM.png?generation=1607043900661795&amp;alt=media\" alt=\"\"></p>\n<p>i am using a standard densenet201 </p>\n<p>```   pretrained_model = tf.keras.applications.DenseNet201(input_shape=(IMAGE_SIZE[0], IMAGE_SIZE[1], 3),weights='imagenet', include_top=False)</p>\n<pre><code>    #pretrained_model.trainable = False # False = transfer learning, True = fine-tuning\n    pretrained_model.trainable = True\n    model = tf.keras.Sequential([\n        #img_adjust_layer,\n        pretrained_model,\n        tf.keras.layers.GlobalAveragePooling2D(),\n        tf.keras.layers.Dense(64,activation='relu' ,kernel_regularizer=regularizers.l2(0.003) ),\n        #tf.keras.layers.Dropout(0.5),\n        tf.keras.layers.Dense(len(CLASSES), activation='softmax',dtype='float32')\n    ])\n</code></pre>\n<p>```</p>\n<p>i added a l2 regularizer as my model is overfitting . I am using this dataset <br>\ni am trying to use <a href=\"https://www.kaggle.com/kingofarmy/cassavapreprocessed\" target=\"_blank\">https://www.kaggle.com/kingofarmy/cassavapreprocessed</a> </p>",
      "rawMarkdown": "![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3245919%2Fe7fdbde14e1c8747cc577c9169ede34a%2FScreen%20Shot%202020-12-03%20at%205.04.42%20PM.png?generation=1607043900661795&alt=media)\n\ni am using a standard densenet201 \n\n```   pretrained_model = tf.keras.applications.DenseNet201(input_shape=(IMAGE_SIZE[0], IMAGE_SIZE[1], 3),weights='imagenet', include_top=False)\n\n        #pretrained_model.trainable = False # False = transfer learning, True = fine-tuning\n        pretrained_model.trainable = True\n        model = tf.keras.Sequential([\n            #img_adjust_layer,\n            pretrained_model,\n            tf.keras.layers.GlobalAveragePooling2D(),\n            tf.keras.layers.Dense(64,activation='relu' ,kernel_regularizer=regularizers.l2(0.003) ),\n            #tf.keras.layers.Dropout(0.5),\n            tf.keras.layers.Dense(len(CLASSES), activation='softmax',dtype='float32')\n        ])\n\n```\n\ni added a l2 regularizer as my model is overfitting . I am using this dataset \ni am trying to use https://www.kaggle.com/kingofarmy/cassavapreprocessed",
      "votes": null
    },
    {
      "id": "1101582",
      "postDate": "12/04/2020 03:34:36",
      "content": "<p>Could read i/o be a issue as </p>\n<ul>\n<li>each there are a total of 26k files</li>\n<li>each individual file has just one record</li>\n</ul>",
      "rawMarkdown": "Could read i/o be a issue as \n- each there are a total of 26k files\n- each individual file has just one record",
      "votes": null
    },
    {
      "id": "1102749",
      "postDate": "12/05/2020 09:00:57",
      "content": "<p>If you are unfreezing any layers make sure not to unfreeze the batch normalization layers or else your model training will consume a lot of time!</p>",
      "rawMarkdown": "If you are unfreezing any layers make sure not to unfreeze the batch normalization layers or else your model training will consume a lot of time!",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1101582,
      "author_name": "venkat555",
      "author_url": "",
      "post_date": "12/04/2020 03:34:36",
      "content": "<p>Could read i/o be a issue as </p>\n<ul>\n<li>each there are a total of 26k files</li>\n<li>each individual file has just one record</li>\n</ul>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1102749,
      "author_name": "harveenchadha",
      "author_url": "",
      "post_date": "12/05/2020 09:00:57",
      "content": "<p>If you are unfreezing any layers make sure not to unfreeze the batch normalization layers or else your model training will consume a lot of time!</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1101515": "![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3245919%2Fe7fdbde14e1c8747cc577c9169ede34a%2FScreen%20Shot%202020-12-03%20at%205.04.42%20PM.png?generation=1607043900661795&alt=media)\n\ni am using a standard densenet201 \n\n```   pretrained_model = tf.keras.applications.DenseNet201(input_shape=(IMAGE_SIZE[0], IMAGE_SIZE[1], 3),weights='imagenet', include_top=False)\n\n        #pretrained_model.trainable = False # False = transfer learning, True = fine-tuning\n        pretrained_model.trainable = True\n        model = tf.keras.Sequential([\n            #img_adjust_layer,\n            pretrained_model,\n            tf.keras.layers.GlobalAveragePooling2D(),\n            tf.keras.layers.Dense(64,activation='relu' ,kernel_regularizer=regularizers.l2(0.003) ),\n            #tf.keras.layers.Dropout(0.5),\n            tf.keras.layers.Dense(len(CLASSES), activation='softmax',dtype='float32')\n        ])\n\n```\n\ni added a l2 regularizer as my model is overfitting . I am using this dataset \ni am trying to use https://www.kaggle.com/kingofarmy/cassavapreprocessed",
    "1101582": "Could read i/o be a issue as \n- each there are a total of 26k files\n- each individual file has just one record",
    "1102749": "If you are unfreezing any layers make sure not to unfreeze the batch normalization layers or else your model training will consume a lot of time!"
  },
  "source": "meta"
}