Commit ef6cea31 authored by Bannier Delphine's avatar Bannier Delphine
Browse files

Merge branch 'master' into 'DelphineBranch'

# Conflicts:
#   .gitignore
#   preprocessing/read_load_data.py
#   processing/models.py
parents 294cc281 911189dd
......@@ -12,6 +12,4 @@ ipython_config.py
# Remove previous ipynb_checkpoints
# git rm -r .ipynb_checkpoints/
preprocessing/__pycache__/*
processing/__pycache__/*
postprocessing/__pycache__/*
*/__pycache__/*
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -198,9 +198,9 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Array shape: (176, 240, 240, 4)\n",
"min value: -0.1251496147096971\n",
"max value: 0.1692184837618322\n"
"Array shape: (176, 240, 240)\n",
"min value: -0.124956130312047\n",
"max value: 0.13136708968066257\n"
]
}
],
......@@ -209,15 +209,13 @@
"\n",
"logging.info(\"loading attributes...\")\n",
"df = pd.read_csv(f'{input_directory}/train.csv')\n",
"df = df.drop_duplicates(subset = 'Patient', keep='first')\n",
"patients_train_ids= df.Patient.unique().tolist()\n",
"df = df[df['Patient'].isin(patients_train_ids)]\n",
"\n",
"logging.info(\"loading images...\")\n",
"images = load_images(input_directory,\n",
" 'train',\n",
" patients_train_ids,\n",
" option='superposition',\n",
" option='collage',\n",
" outputH = 240,\n",
" outputW = 240)\n",
"\n",
......@@ -227,6 +225,293 @@
"print('max value: ', np.amax(images))"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Patient</th>\n",
" <th>Weeks</th>\n",
" <th>FVC</th>\n",
" <th>Percent</th>\n",
" <th>Age</th>\n",
" <th>Sex</th>\n",
" <th>SmokingStatus</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>ID00007637202177411956430</td>\n",
" <td>-4</td>\n",
" <td>2315</td>\n",
" <td>58.253649</td>\n",
" <td>79</td>\n",
" <td>Male</td>\n",
" <td>Ex-smoker</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>ID00007637202177411956430</td>\n",
" <td>5</td>\n",
" <td>2214</td>\n",
" <td>55.712129</td>\n",
" <td>79</td>\n",
" <td>Male</td>\n",
" <td>Ex-smoker</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>ID00007637202177411956430</td>\n",
" <td>7</td>\n",
" <td>2061</td>\n",
" <td>51.862104</td>\n",
" <td>79</td>\n",
" <td>Male</td>\n",
" <td>Ex-smoker</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>ID00007637202177411956430</td>\n",
" <td>9</td>\n",
" <td>2144</td>\n",
" <td>53.950679</td>\n",
" <td>79</td>\n",
" <td>Male</td>\n",
" <td>Ex-smoker</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>ID00007637202177411956430</td>\n",
" <td>11</td>\n",
" <td>2069</td>\n",
" <td>52.063412</td>\n",
" <td>79</td>\n",
" <td>Male</td>\n",
" <td>Ex-smoker</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Patient Weeks FVC Percent Age Sex SmokingStatus\n",
"0 ID00007637202177411956430 -4 2315 58.253649 79 Male Ex-smoker\n",
"1 ID00007637202177411956430 5 2214 55.712129 79 Male Ex-smoker\n",
"2 ID00007637202177411956430 7 2061 51.862104 79 Male Ex-smoker\n",
"3 ID00007637202177411956430 9 2144 53.950679 79 Male Ex-smoker\n",
"4 ID00007637202177411956430 11 2069 52.063412 79 Male Ex-smoker"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df.head()"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Patient</th>\n",
" <th>Weeks</th>\n",
" <th>FVC</th>\n",
" <th>Percent</th>\n",
" <th>Age</th>\n",
" <th>Sex</th>\n",
" <th>SmokingStatus</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>ID00009637202177434476278</td>\n",
" <td>8</td>\n",
" <td>3660</td>\n",
" <td>85.282878</td>\n",
" <td>69</td>\n",
" <td>Male</td>\n",
" <td>Ex-smoker</td>\n",
" </tr>\n",
" <tr>\n",
" <th>10</th>\n",
" <td>ID00009637202177434476278</td>\n",
" <td>9</td>\n",
" <td>3610</td>\n",
" <td>84.117812</td>\n",
" <td>69</td>\n",
" <td>Male</td>\n",
" <td>Ex-smoker</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11</th>\n",
" <td>ID00009637202177434476278</td>\n",
" <td>11</td>\n",
" <td>3895</td>\n",
" <td>90.758691</td>\n",
" <td>69</td>\n",
" <td>Male</td>\n",
" <td>Ex-smoker</td>\n",
" </tr>\n",
" <tr>\n",
" <th>12</th>\n",
" <td>ID00009637202177434476278</td>\n",
" <td>13</td>\n",
" <td>3759</td>\n",
" <td>87.589710</td>\n",
" <td>69</td>\n",
" <td>Male</td>\n",
" <td>Ex-smoker</td>\n",
" </tr>\n",
" <tr>\n",
" <th>13</th>\n",
" <td>ID00009637202177434476278</td>\n",
" <td>15</td>\n",
" <td>3639</td>\n",
" <td>84.793550</td>\n",
" <td>69</td>\n",
" <td>Male</td>\n",
" <td>Ex-smoker</td>\n",
" </tr>\n",
" <tr>\n",
" <th>14</th>\n",
" <td>ID00009637202177434476278</td>\n",
" <td>22</td>\n",
" <td>3578</td>\n",
" <td>83.372169</td>\n",
" <td>69</td>\n",
" <td>Male</td>\n",
" <td>Ex-smoker</td>\n",
" </tr>\n",
" <tr>\n",
" <th>15</th>\n",
" <td>ID00009637202177434476278</td>\n",
" <td>33</td>\n",
" <td>3625</td>\n",
" <td>84.467332</td>\n",
" <td>69</td>\n",
" <td>Male</td>\n",
" <td>Ex-smoker</td>\n",
" </tr>\n",
" <tr>\n",
" <th>16</th>\n",
" <td>ID00009637202177434476278</td>\n",
" <td>45</td>\n",
" <td>3390</td>\n",
" <td>78.991518</td>\n",
" <td>69</td>\n",
" <td>Male</td>\n",
" <td>Ex-smoker</td>\n",
" </tr>\n",
" <tr>\n",
" <th>17</th>\n",
" <td>ID00009637202177434476278</td>\n",
" <td>60</td>\n",
" <td>3214</td>\n",
" <td>74.890484</td>\n",
" <td>69</td>\n",
" <td>Male</td>\n",
" <td>Ex-smoker</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Patient Weeks FVC Percent Age Sex SmokingStatus\n",
"9 ID00009637202177434476278 8 3660 85.282878 69 Male Ex-smoker\n",
"10 ID00009637202177434476278 9 3610 84.117812 69 Male Ex-smoker\n",
"11 ID00009637202177434476278 11 3895 90.758691 69 Male Ex-smoker\n",
"12 ID00009637202177434476278 13 3759 87.589710 69 Male Ex-smoker\n",
"13 ID00009637202177434476278 15 3639 84.793550 69 Male Ex-smoker\n",
"14 ID00009637202177434476278 22 3578 83.372169 69 Male Ex-smoker\n",
"15 ID00009637202177434476278 33 3625 84.467332 69 Male Ex-smoker\n",
"16 ID00009637202177434476278 45 3390 78.991518 69 Male Ex-smoker\n",
"17 ID00009637202177434476278 60 3214 74.890484 69 Male Ex-smoker"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df.loc[np.where(df.Patient == 'ID00009637202177434476278')]"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Patient ID00009637202177434476278\n",
"Weeks 9\n",
"FVC 3610\n",
"Percent 84.1178\n",
"Age 69\n",
"Sex Male\n",
"SmokingStatus Ex-smoker\n",
"Name: 10, dtype: object"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df.iloc[10]"
]
},
{
"cell_type": "markdown",
"metadata": {},
......@@ -236,14 +521,87 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
"from sklearn.model_selection import train_test_split\n",
" from sklearn.model_selection import train_test_split\n",
"\n",
"split = train_test_split(df, images, test_size=0.2, random_state=42)\n",
"(trainAttrX, testAttrX, trainImagesX, testImagesX) = split"
"split = train_test_split(patients_train_ids, images, test_size=0.2, random_state=42)\n",
"(trainPatient, testPatient, trainImagesX, testImagesX) = split"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
" #split the dataframe like the images\n",
"df_train = df[df.Patient.isin(trainPatient)].copy()\n",
"df_test = df[df.Patient.isin(testPatient)].copy()"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(1093, 8) (280, 8)\n"
]
}
],
"source": [
"from preprocessing.read_load_data import create_dataframe\n",
"\n",
"trainAttrX = create_dataframe(df_train)\n",
"testAttrX = create_dataframe(df_test)\n",
"print(trainAttrX.shape, testAttrX.shape)"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"ename": "ValueError",
"evalue": "could not broadcast input array from shape (240,240) into shape (240,240,4)",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-12-e2ee16f176f4>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m 6\u001b[0m \u001b[0mnb_data\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtrainAttrX\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mtrainAttrX\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mPatientID\u001b[0m \u001b[0;34m==\u001b[0m\u001b[0mpatient\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 7\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mii\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mrange\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mnb_data\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 8\u001b[0;31m \u001b[0mtrain_dataset\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mindice\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtrainImagesX\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mi\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 9\u001b[0m \u001b[0mindice\u001b[0m\u001b[0;34m+=\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 10\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;31mValueError\u001b[0m: could not broadcast input array from shape (240,240) into shape (240,240,4)"
]
}
],
"source": [
"#set one image per training row\n",
"\n",
"indice = 0\n",
"train_dataset = np.ndarray((len(trainAttrX),240,240,4))\n",
"for i,patient in enumerate(trainPatient):\n",
" nb_data = len(trainAttrX[trainAttrX.PatientID ==patient])\n",
" for ii in range(nb_data):\n",
" train_dataset[indice]=(trainImagesX[i])\n",
" indice+=1\n",
" \n",
" \n",
"indicet = 0 \n",
"test_dataset = np.ndarray((len(testAttrX),240,240,4))\n",
"for i,patient in enumerate(testPatient):\n",
" nb_data = len(testAttrX[testAttrX.PatientID ==patient])\n",
" for ii in range(nb_data):\n",
" test_dataset[indicet] = testImagesX[i]\n",
" indicet+=1\n",
" \n",
" \n",
"print(len(train_dataset),len(test_dataset))"
]
},
{
......@@ -255,20 +613,20 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 14,
"metadata": {},
"outputs": [],
"source": [
"from preprocessing.scale_data import scale_variable\n",
"\n",
"sc, trainAttrX, testAttrX = scale_variable(trainAttrX, testAttrX,'FVC')\n",
"trainY = trainAttrX.loc[:,'FVC_scaled']\n",
"testY = testAttrX.loc[:,'FVC_scaled']"
"sc, trainAttrX, testAttrX = scale_variable(trainAttrX, testAttrX,'Target_FVC')\n",
"trainY = trainAttrX.loc[:,'Target_FVC_scaled']\n",
"testY = testAttrX.loc[:,'Target_FVC_scaled']"
]
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 15,
"metadata": {},
"outputs": [],
"source": [
......@@ -277,8 +635,8 @@
"trainAttrX, testAttrX = encode_variable(trainAttrX, testAttrX,'Sex')\n",
"trainAttrX, testAttrX = encode_variable(trainAttrX, testAttrX,'SmokingStatus')\n",
"\n",
"trainAttrX.drop(columns = ['Sex','SmokingStatus','FVC','FVC_scaled','Patient'], inplace = True)\n",
"testAttrX.drop(columns = ['Sex','SmokingStatus','FVC','FVC_scaled','Patient'], inplace = True)"
"trainAttrX.drop(columns = ['Sex','SmokingStatus','Target_FVC','Target_FVC_scaled','PatientID'], inplace = True)\n",
"testAttrX.drop(columns = ['Sex','SmokingStatus','Target_FVC','Target_FVC_scaled','PatientID'], inplace = True)"
]
},
{
......@@ -290,16 +648,16 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 33,
"metadata": {},
"outputs": [],
"source": [
"from processing.models import create_hybrid_transfer\n",
"from keras.optimizers import Adam\n",
"from tensorflow.keras.models import Model\n",
"\n",
"import efficientnet.tfkeras as efn\n",
"new_model =efn.EfficientNetB1(weights='None',include_top=False)\n",
"\n",
"new_model =efn.EfficientNetB1(weights='imagenet',include_top=False)\n",
"\n",
"input_channel = 4\n",
"config = new_model.get_config()\n",
......@@ -314,45 +672,973 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 34,
"metadata": {},
"outputs": [
{
"ename": "NameError",
"evalue": "name 'model' is not defined",
"name": "stdout",
"output_type": "stream",
"text": [
"Model: \"model_5\"\n",
"__________________________________________________________________________________________________\n",
"Layer (type) Output Shape Param # Connected to \n",
"==================================================================================================\n",
"input_3 (InputLayer) [(None, 240, 240, 4) 0 \n",
"__________________________________________________________________________________________________\n",
"stem_conv (Conv2D) (None, 120, 120, 32) 1152 input_3[0][0] \n",
"__________________________________________________________________________________________________\n",
"stem_bn (BatchNormalization) (None, 120, 120, 32) 128 stem_conv[0][0] \n",
"__________________________________________________________________________________________________\n",
"stem_activation (Activation) (None, 120, 120, 32) 0 stem_bn[0][0] \n",
"__________________________________________________________________________________________________\n",
"block1a_dwconv (DepthwiseConv2D (None, 120, 120, 32) 288 stem_activation[0][0] \n",
"__________________________________________________________________________________________________\n",
"block1a_bn (BatchNormalization) (None, 120, 120, 32) 128 block1a_dwconv[0][0] \n",
"__________________________________________________________________________________________________\n",
"block1a_activation (Activation) (None, 120, 120, 32) 0 block1a_bn[0][0] \n",
"__________________________________________________________________________________________________\n",
"block1a_se_squeeze (GlobalAvera (None, 32) 0 block1a_activation[0][0] \n",
"__________________________________________________________________________________________________\n",
"block1a_se_reshape (Reshape) (None, 1, 1, 32) 0 block1a_se_squeeze[0][0] \n",
"__________________________________________________________________________________________________\n",
"block1a_se_reduce (Conv2D) (None, 1, 1, 8) 264 block1a_se_reshape[0][0] \n",
"__________________________________________________________________________________________________\n",
"block1a_se_expand (Conv2D) (None, 1, 1, 32) 288 block1a_se_reduce[0][0] \n",
"__________________________________________________________________________________________________\n",
"block1a_se_excite (Multiply) (None, 120, 120, 32) 0 block1a_activation[0][0] \n",
" block1a_se_expand[0][0] \n",
"__________________________________________________________________________________________________\n",
"block1a_project_conv (Conv2D) (None, 120, 120, 16) 512 block1a_se_excite[0][0] \n",
"__________________________________________________________________________________________________\n",
"block1a_project_bn (BatchNormal (None, 120, 120, 16) 64 block1a_project_conv[0][0] \n",
"__________________________________________________________________________________________________\n",
"block1b_dwconv (DepthwiseConv2D (None, 120, 120, 16) 144 block1a_project_bn[0][0] \n",
"__________________________________________________________________________________________________\n",
"block1b_bn (BatchNormalization) (None, 120, 120, 16) 64 block1b_dwconv[0][0] \n",
"__________________________________________________________________________________________________\n",
"block1b_activation (Activation) (None, 120, 120, 16) 0 block1b_bn[0][0] \n",
"__________________________________________________________________________________________________\n",
"block1b_se_squeeze (GlobalAvera (None, 16) 0 block1b_activation[0][0] \n",
"__________________________________________________________________________________________________\n",
"block1b_se_reshape (Reshape) (None, 1, 1, 16) 0 block1b_se_squeeze[0][0] \n",
"__________________________________________________________________________________________________\n",
"block1b_se_reduce (Conv2D) (None, 1, 1, 4) 68 block1b_se_reshape[0][0] \n",
"__________________________________________________________________________________________________\n",
"block1b_se_expand (Conv2D) (None, 1, 1, 16) 80 block1b_se_reduce[0][0] \n",
"__________________________________________________________________________________________________\n",
"block1b_se_excite (Multiply) (None, 120, 120, 16) 0 block1b_activation[0][0] \n",
" block1b_se_expand[0][0] \n",
"__________________________________________________________________________________________________\n",
"block1b_project_conv (Conv2D) (None, 120, 120, 16) 256 block1b_se_excite[0][0] \n",
"__________________________________________________________________________________________________\n",
"block1b_project_bn (BatchNormal (None, 120, 120, 16) 64 block1b_project_conv[0][0] \n",
"__________________________________________________________________________________________________\n",
"block1b_drop (FixedDropout) (None, 120, 120, 16) 0 block1b_project_bn[0][0] \n",
"__________________________________________________________________________________________________\n",
"block1b_add (Add) (None, 120, 120, 16) 0 block1b_drop[0][0] \n",
" block1a_project_bn[0][0] \n",
"__________________________________________________________________________________________________\n",
"block2a_expand_conv (Conv2D) (None, 120, 120, 96) 1536 block1b_add[0][0] \n",
"__________________________________________________________________________________________________\n",
"block2a_expand_bn (BatchNormali (None, 120, 120, 96) 384 block2a_expand_conv[0][0] \n",
"__________________________________________________________________________________________________\n",
"block2a_expand_activation (Acti (None, 120, 120, 96) 0 block2a_expand_bn[0][0] \n",
"__________________________________________________________________________________________________\n",
"block2a_dwconv (DepthwiseConv2D (None, 60, 60, 96) 864 block2a_expand_activation[0][0] \n",
"__________________________________________________________________________________________________\n",
"block2a_bn (BatchNormalization) (None, 60, 60, 96) 384 block2a_dwconv[0][0] \n",
"__________________________________________________________________________________________________\n",
"block2a_activation (Activation) (None, 60, 60, 96) 0 block2a_bn[0][0] \n",
"__________________________________________________________________________________________________\n",
"block2a_se_squeeze (GlobalAvera (None, 96) 0 block2a_activation[0][0] \n",
"__________________________________________________________________________________________________\n",
"block2a_se_reshape (Reshape) (None, 1, 1, 96) 0 block2a_se_squeeze[0][0] \n",
"__________________________________________________________________________________________________\n",
"block2a_se_reduce (Conv2D) (None, 1, 1, 4) 388 block2a_se_reshape[0][0] \n",
"__________________________________________________________________________________________________\n",
"block2a_se_expand (Conv2D) (None, 1, 1, 96) 480 block2a_se_reduce[0][0] \n",
"__________________________________________________________________________________________________\n",
"block2a_se_excite (Multiply) (None, 60, 60, 96) 0 block2a_activation[0][0] \n",
" block2a_se_expand[0][0] \n",
"__________________________________________________________________________________________________\n",
"block2a_project_conv (Conv2D) (None, 60, 60, 24) 2304 block2a_se_excite[0][0] \n",
"__________________________________________________________________________________________________\n",
"block2a_project_bn (BatchNormal (None, 60, 60, 24) 96 block2a_project_conv[0][0] \n",
"__________________________________________________________________________________________________\n",
"block2b_expand_conv (Conv2D) (None, 60, 60, 144) 3456 block2a_project_bn[0][0] \n",
"__________________________________________________________________________________________________\n",
"block2b_expand_bn (BatchNormali (None, 60, 60, 144) 576 block2b_expand_conv[0][0] \n",
"__________________________________________________________________________________________________\n",
"block2b_expand_activation (Acti (None, 60, 60, 144) 0 block2b_expand_bn[0][0] \n",
"__________________________________________________________________________________________________\n",
"block2b_dwconv (DepthwiseConv2D (None, 60, 60, 144) 1296 block2b_expand_activation[0][0] \n",
"__________________________________________________________________________________________________\n",
"block2b_bn (BatchNormalization) (None, 60, 60, 144) 576 block2b_dwconv[0][0] \n",
"__________________________________________________________________________________________________\n",
"block2b_activation (Activation) (None, 60, 60, 144) 0 block2b_bn[0][0] \n",
"__________________________________________________________________________________________________\n",
"block2b_se_squeeze (GlobalAvera (None, 144) 0 block2b_activation[0][0] \n",
"__________________________________________________________________________________________________\n",
"block2b_se_reshape (Reshape) (None, 1, 1, 144) 0 block2b_se_squeeze[0][0] \n",
"__________________________________________________________________________________________________\n",
"block2b_se_reduce (Conv2D) (None, 1, 1, 6) 870 block2b_se_reshape[0][0] \n",
"__________________________________________________________________________________________________\n",
"block2b_se_expand (Conv2D) (None, 1, 1, 144) 1008 block2b_se_reduce[0][0] \n",
"__________________________________________________________________________________________________\n",
"block2b_se_excite (Multiply) (None, 60, 60, 144) 0 block2b_activation[0][0] \n",
" block2b_se_expand[0][0] \n",
"__________________________________________________________________________________________________\n",
"block2b_project_conv (Conv2D) (None, 60, 60, 24) 3456 block2b_se_excite[0][0] \n",
"__________________________________________________________________________________________________\n",
"block2b_project_bn (BatchNormal (None, 60, 60, 24) 96 block2b_project_conv[0][0] \n",
"__________________________________________________________________________________________________\n",
"block2b_drop (FixedDropout) (None, 60, 60, 24) 0 block2b_project_bn[0][0] \n",
"__________________________________________________________________________________________________\n",
"block2b_add (Add) (None, 60, 60, 24) 0 block2b_drop[0][0] \n",
" block2a_project_bn[0][0] \n",
"__________________________________________________________________________________________________\n",
"block2c_expand_conv (Conv2D) (None, 60, 60, 144) 3456 block2b_add[0][0] \n",
"__________________________________________________________________________________________________\n",
"block2c_expand_bn (BatchNormali (None, 60, 60, 144) 576 block2c_expand_conv[0][0] \n",
"__________________________________________________________________________________________________\n",
"block2c_expand_activation (Acti (None, 60, 60, 144) 0 block2c_expand_bn[0][0] \n",
"__________________________________________________________________________________________________\n",
"block2c_dwconv (DepthwiseConv2D (None, 60, 60, 144) 1296 block2c_expand_activation[0][0] \n",
"__________________________________________________________________________________________________\n",
"block2c_bn (BatchNormalization) (None, 60, 60, 144) 576 block2c_dwconv[0][0] \n",
"__________________________________________________________________________________________________\n",
"block2c_activation (Activation) (None, 60, 60, 144) 0 block2c_bn[0][0] \n",
"__________________________________________________________________________________________________\n",
"block2c_se_squeeze (GlobalAvera (None, 144) 0 block2c_activation[0][0] \n",
"__________________________________________________________________________________________________\n",
"block2c_se_reshape (Reshape) (None, 1, 1, 144) 0 block2c_se_squeeze[0][0] \n",
"__________________________________________________________________________________________________\n",