Inception-v3 迁移学习“冻结”层

Posted

技术标签:

【中文标题】Inception-v3 迁移学习“冻结”层【英文标题】:Inception-v3 transfer learning 'freezing' layers 【发布时间】:2017-11-23 17:56:14 【问题描述】:

我使用 Inception-v3 网络进行迁移学习。网络中的前 172 层被“冻结”。但是 Inception-v3 网络只有 48 层。 “额外”层从何而来?

非常感谢。

【问题讨论】:

【参考方案1】:

实际上 inception 模块要复杂一些。它没有一个分支。稍后将这些多个分支连接成单个分支。如果你列出 keras 中的所有层,你会得到:

[ 1 ]  <keras.engine.topology.InputLayer object at 0x7f94c6b95750>
[ 2 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c6577610>
[ 3 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c65778d0>
[ 4 ]  <keras.layers.core.Activation object at 0x7f94c6577a90>
[ 5 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c6900f50>
[ 6 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c6878bd0>
[ 7 ]  <keras.layers.core.Activation object at 0x7f94c690e750>
[ 8 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c68d1e10>
[ 9 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c68d1f10>
[ 10 ]  <keras.layers.core.Activation object at 0x7f94c6652b90>
[ 11 ]  <keras.layers.pooling.MaxPooling2D object at 0x7f94c6319390>
[ 12 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c6309490>
[ 13 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c62cea50>
[ 14 ]  <keras.layers.core.Activation object at 0x7f94c628b890>
[ 15 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c62a4490>
[ 16 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c62b7750>
[ 17 ]  <keras.layers.core.Activation object at 0x7f94c626ac50>
[ 18 ]  <keras.layers.pooling.MaxPooling2D object at 0x7f94c6226a10>
[ 19 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c6064850>
[ 20 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c6076b10>
[ 21 ]  <keras.layers.core.Activation object at 0x7f94c602bf10>
[ 22 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c6146ad0>
[ 23 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c5ff7710>
[ 24 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c6155d90>
[ 25 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c5f889d0>
[ 26 ]  <keras.layers.core.Activation object at 0x7f94c6119e90>
[ 27 ]  <keras.layers.core.Activation object at 0x7f94c5fbaed0>
[ 28 ]  <keras.layers.pooling.AveragePooling2D object at 0x7f94c5e88850>
[ 29 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c62329d0>
[ 30 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c60d4990>
[ 31 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c5f77b50>
[ 32 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c5e962d0>
[ 33 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c6232350>
[ 34 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c60e6c50>
[ 35 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c5f77750>
[ 36 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c5e5a890>
[ 37 ]  <keras.layers.core.Activation object at 0x7f94c619cf90>
[ 38 ]  <keras.layers.core.Activation object at 0x7f94c60ac8d0>
[ 39 ]  <keras.layers.core.Activation object at 0x7f94c5ec8b10>
[ 40 ]  <keras.layers.core.Activation object at 0x7f94c5e0ca90>
[ 41 ]  <keras.layers.merge.Concatenate object at 0x7f94c5e24890>
[ 42 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c5c4f990>
[ 43 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c5c4f590>
[ 44 ]  <keras.layers.core.Activation object at 0x7f94c5c22310>
[ 45 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c5db9910>
[ 46 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c5bde710>
[ 47 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c5d49ad0>
[ 48 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c5bde310>
[ 49 ]  <keras.layers.core.Activation object at 0x7f94c5d0df10>
[ 50 ]  <keras.layers.core.Activation object at 0x7f94c5bb3750>
[ 51 ]  <keras.layers.pooling.AveragePooling2D object at 0x7f94c5a81c50>
[ 52 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c5e39a50>
[ 53 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c5cc9690>
[ 54 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c5b6fe90>
[ 55 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c5af5dd0>
[ 56 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c5e19a10>
[ 57 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c5cdd850>
[ 58 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c5b6fed0>
[ 59 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c5a44850>
[ 60 ]  <keras.layers.core.Activation object at 0x7f94c5d9eb10>
[ 61 ]  <keras.layers.core.Activation object at 0x7f94c5c90c50>
[ 62 ]  <keras.layers.core.Activation object at 0x7f94c5ac54d0>
[ 63 ]  <keras.layers.core.Activation object at 0x7f94c5a66710>
[ 64 ]  <keras.layers.merge.Concatenate object at 0x7f94c5a157d0>
[ 65 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c589aad0>
[ 66 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c5854350>
[ 67 ]  <keras.layers.core.Activation object at 0x7f94c581b390>
[ 68 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c59a4850>
[ 69 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c57d5b10>
[ 70 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c59a4450>
[ 71 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c57e9cd0>
[ 72 ]  <keras.layers.core.Activation object at 0x7f94c596ae90>
[ 73 ]  <keras.layers.core.Activation object at 0x7f94c57aed90>
[ 74 ]  <keras.layers.pooling.AveragePooling2D object at 0x7f94c56fb610>
[ 75 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c5a153d0>
[ 76 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c59365d0>
[ 77 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c5769890>
[ 78 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c56eec50>
[ 79 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c5a237d0>
[ 80 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c59361d0>
[ 81 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c577aa50>
[ 82 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c56bd210>
[ 83 ]  <keras.layers.core.Activation object at 0x7f94c5995090>
[ 84 ]  <keras.layers.core.Activation object at 0x7f94c588b610>
[ 85 ]  <keras.layers.core.Activation object at 0x7f94c56c1e90>
[ 86 ]  <keras.layers.core.Activation object at 0x7f94c566edd0>
[ 87 ]  <keras.layers.merge.Concatenate object at 0x7f94c560dbd0>
[ 88 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c559ec50>
[ 89 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c55ae7d0>
[ 90 ]  <keras.layers.core.Activation object at 0x7f94c5573250>
[ 91 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c552d9d0>
[ 92 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c54c0b90>
[ 93 ]  <keras.layers.core.Activation object at 0x7f94c5484fd0>
[ 94 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c561dd90>
[ 95 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c5441750>
[ 96 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c567fd50>
[ 97 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c5452910>
[ 98 ]  <keras.layers.core.Activation object at 0x7f94c5581e50>
[ 99 ]  <keras.layers.core.Activation object at 0x7f94c5408d10>
[ 100 ]  <keras.layers.pooling.MaxPooling2D object at 0x7f94c53c6a50>
[ 101 ]  <keras.layers.merge.Concatenate object at 0x7f94c53d5a50>
[ 102 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c5196690>
[ 103 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c51ab850>
[ 104 ]  <keras.layers.core.Activation object at 0x7f94c515dc50>
[ 105 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c511b990>
[ 106 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c511b590>
[ 107 ]  <keras.layers.core.Activation object at 0x7f94c50ee310>
[ 108 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c53743d0>
[ 109 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c50ae710>
[ 110 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c5366e10>
[ 111 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c50ae310>
[ 112 ]  <keras.layers.core.Activation object at 0x7f94c5337410>
[ 113 ]  <keras.layers.core.Activation object at 0x7f94c5001750>
[ 114 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c52f4b90>
[ 115 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c4fc2e90>
[ 116 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c5284d50>
[ 117 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c4fc2ed0>
[ 118 ]  <keras.layers.core.Activation object at 0x7f94c524b190>
[ 119 ]  <keras.layers.core.Activation object at 0x7f94c4f924d0>
[ 120 ]  <keras.layers.pooling.AveragePooling2D object at 0x7f94c4ed3f50>
[ 121 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c53d54d0>
[ 122 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c5204910>
[ 123 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c4f50c50>
[ 124 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c4ede9d0>
[ 125 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c53983d0>
[ 126 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c5217ad0>
[ 127 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c4f5f7d0>
[ 128 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c4ea6550>
[ 129 ]  <keras.layers.core.Activation object at 0x7f94c5348290>
[ 130 ]  <keras.layers.core.Activation object at 0x7f94c51dbf10>
[ 131 ]  <keras.layers.core.Activation object at 0x7f94c4f23250>
[ 132 ]  <keras.layers.core.Activation object at 0x7f94c4e47450>
[ 133 ]  <keras.layers.merge.Concatenate object at 0x7f94c4e73550>
[ 134 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c4c388d0>
[ 135 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c4bcaa90>
[ 136 ]  <keras.layers.core.Activation object at 0x7f94c4b8eed0>
[ 137 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c4b47650>
[ 138 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c4b5d810>
[ 139 ]  <keras.layers.core.Activation object at 0x7f94c4b0cc10>
[ 140 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c4d85610>
[ 141 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c4ace950>
[ 142 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c4d85210>
[ 143 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c4ace550>
[ 144 ]  <keras.layers.core.Activation object at 0x7f94c4d4ac50>
[ 145 ]  <keras.layers.core.Activation object at 0x7f94c4aa02d0>
[ 146 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c4d25390>
[ 147 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c4a5c6d0>
[ 148 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c4d16dd0>
[ 149 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c4a5c2d0>
[ 150 ]  <keras.layers.core.Activation object at 0x7f94c4ced3d0>
[ 151 ]  <keras.layers.core.Activation object at 0x7f94c4a31710>
[ 152 ]  <keras.layers.pooling.AveragePooling2D object at 0x7f94c4904c10>
[ 153 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c4e03290>
[ 154 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c4ca9b50>
[ 155 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c49fe450>
[ 156 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c4973f90>
[ 157 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c4e36e90>
[ 158 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c4cb9d10>
[ 159 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c49eee90>
[ 160 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c48c6810>
[ 161 ]  <keras.layers.core.Activation object at 0x7f94c4de8a10>
[ 162 ]  <keras.layers.core.Activation object at 0x7f94c4c76dd0>
[ 163 ]  <keras.layers.core.Activation object at 0x7f94c4944490>
[ 164 ]  <keras.layers.core.Activation object at 0x7f94c48e66d0>
[ 165 ]  <keras.layers.merge.Concatenate object at 0x7f94c4893790>
[ 166 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c465aad0>
[ 167 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c466ac90>
[ 168 ]  <keras.layers.core.Activation object at 0x7f94c462ed50>
[ 169 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c45e7850>
[ 170 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c45fba10>
[ 171 ]  <keras.layers.core.Activation object at 0x7f94c45aee10>
[ 172 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c4824810>
[ 173 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c457b5d0>
[ 174 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c4824410>
[ 175 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c450f790>
[ 176 ]  <keras.layers.core.Activation object at 0x7f94c47e9e50>
[ 177 ]  <keras.layers.core.Activation object at 0x7f94c453eb90>
[ 178 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c47b8590>
[ 179 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c44fd8d0>
[ 180 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c47b8190>
[ 181 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c44fd4d0>
[ 182 ]  <keras.layers.core.Activation object at 0x7f94c470a5d0>
[ 183 ]  <keras.layers.core.Activation object at 0x7f94c4451250>
[ 184 ]  <keras.layers.pooling.AveragePooling2D object at 0x7f94c43b03d0>
[ 185 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c4893390>
[ 186 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c4719a90>
[ 187 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c4411650>
[ 188 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c43a0490>
[ 189 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c48a1790>
[ 190 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c46d2310>
[ 191 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c4411250>
[ 192 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c4375410>
[ 193 ]  <keras.layers.core.Activation object at 0x7f94c4815050>
[ 194 ]  <keras.layers.core.Activation object at 0x7f94c469c350>
[ 195 ]  <keras.layers.core.Activation object at 0x7f94c43d6c90>
[ 196 ]  <keras.layers.core.Activation object at 0x7f94c43220d0>
[ 197 ]  <keras.layers.merge.Concatenate object at 0x7f94c4331990>
[ 198 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c40fbc90>
[ 199 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c4089810>
[ 200 ]  <keras.layers.core.Activation object at 0x7f94c404c290>
[ 201 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c400aa10>
[ 202 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c401bbd0>
[ 203 ]  <keras.layers.core.Activation object at 0x7f94c3fdff90>
[ 204 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c42429d0>
[ 205 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c3f99790>
[ 206 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c42425d0>
[ 207 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c3fac950>
[ 208 ]  <keras.layers.core.Activation object at 0x7f94c4215050>
[ 209 ]  <keras.layers.core.Activation object at 0x7f94c3f60d50>
[ 210 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c41d3750>
[ 211 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c3f1ea90>
[ 212 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c41d3350>
[ 213 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c3f1e690>
[ 214 ]  <keras.layers.core.Activation object at 0x7f94c41a8790>
[ 215 ]  <keras.layers.core.Activation object at 0x7f94c3eefad0>
[ 216 ]  <keras.layers.pooling.AveragePooling2D object at 0x7f94c3dc1590>
[ 217 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c4e73150>
[ 218 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c41674d0>
[ 219 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c3ead810>
[ 220 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c3dd0110>
[ 221 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c4331590>
[ 222 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c41670d0>
[ 223 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c3ead410>
[ 224 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c3d955d0>
[ 225 ]  <keras.layers.core.Activation object at 0x7f94c4294190>
[ 226 ]  <keras.layers.core.Activation object at 0x7f94c413d510>
[ 227 ]  <keras.layers.core.Activation object at 0x7f94c3e74e50>
[ 228 ]  <keras.layers.core.Activation object at 0x7f94c3d44290>
[ 229 ]  <keras.layers.merge.Concatenate object at 0x7f94c3d5f5d0>
[ 230 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c3c76950>
[ 231 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c3c76550>
[ 232 ]  <keras.layers.core.Activation object at 0x7f94c3bcb2d0>
[ 233 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c3b886d0>
[ 234 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c3b882d0>
[ 235 ]  <keras.layers.core.Activation object at 0x7f94c3b57710>
[ 236 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c3d71790>
[ 237 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c3b28450>
[ 238 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c3d53750>
[ 239 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c3b19e90>
[ 240 ]  <keras.layers.core.Activation object at 0x7f94c3cd4150>
[ 241 ]  <keras.layers.core.Activation object at 0x7f94c3aea490>
[ 242 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c3cf0650>
[ 243 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c3aa6c10>
[ 244 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c3c85810>
[ 245 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c3ab6dd0>
[ 246 ]  <keras.layers.core.Activation object at 0x7f94c3cb6c10>
[ 247 ]  <keras.layers.core.Activation object at 0x7f94c3a00210>
[ 248 ]  <keras.layers.pooling.MaxPooling2D object at 0x7f94c3a39990>
[ 249 ]  <keras.layers.merge.Concatenate object at 0x7f94c3a2dfd0>
[ 250 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c3790d50>
[ 251 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c37f4d10>
[ 252 ]  <keras.layers.core.Activation object at 0x7f94c3775e50>
[ 253 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c394c8d0>
[ 254 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c3711c50>
[ 255 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c394c4d0>
[ 256 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c37217d0>
[ 257 ]  <keras.layers.core.Activation object at 0x7f94c3920250>
[ 258 ]  <keras.layers.core.Activation object at 0x7f94c36e5250>
[ 259 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c38df650>
[ 260 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c387e3d0>
[ 261 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c36a29d0>
[ 262 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c3633750>
[ 263 ]  <keras.layers.pooling.AveragePooling2D object at 0x7f94c35b7650>
[ 264 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c3983890>
[ 265 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c38df250>
[ 266 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c3870e10>
[ 267 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c36b4b90>
[ 268 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c35c6910>
[ 269 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c3545050>
[ 270 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c3992750>
[ 271 ]  <keras.layers.core.Activation object at 0x7f94c38a2c90>
[ 272 ]  <keras.layers.core.Activation object at 0x7f94c37c2410>
[ 273 ]  <keras.layers.core.Activation object at 0x7f94c367afd0>
[ 274 ]  <keras.layers.core.Activation object at 0x7f94c35f8d10>
[ 275 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c3508a90>
[ 276 ]  <keras.layers.core.Activation object at 0x7f94c39bfdd0>
[ 277 ]  <keras.layers.merge.Concatenate object at 0x7f94c3780b90>
[ 278 ]  <keras.layers.merge.Concatenate object at 0x7f94c35b7a50>
[ 279 ]  <keras.layers.core.Activation object at 0x7f94c353c110>
[ 280 ]  <keras.layers.merge.Concatenate object at 0x7f94c34e9390>
[ 281 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c32b2890>
[ 282 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c3294850>
[ 283 ]  <keras.layers.core.Activation object at 0x7f94c3211990>
[ 284 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c3479410>
[ 285 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c322d790>
[ 286 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c3466e50>
[ 287 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c323f950>
[ 288 ]  <keras.layers.core.Activation object at 0x7f94c343c450>
[ 289 ]  <keras.layers.core.Activation object at 0x7f94c31f6d50>
[ 290 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c33f9bd0>
[ 291 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c330c950>
[ 292 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c31b3a90>
[ 293 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c30c6810>
[ 294 ]  <keras.layers.pooling.AveragePooling2D object at 0x7f94c3055190>
[ 295 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c34dadd0>
[ 296 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c3389d90>
[ 297 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c331fb10>
[ 298 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c31b3690>
[ 299 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c30c6410>
[ 300 ]  <keras.layers.convolutional.Conv2D object at 0x7f94c303c110>
[ 301 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c34da050>
[ 302 ]  <keras.layers.core.Activation object at 0x7f94c33501d0>
[ 303 ]  <keras.layers.core.Activation object at 0x7f94c32e1f50>
[ 304 ]  <keras.layers.core.Activation object at 0x7f94c3106ad0>
[ 305 ]  <keras.layers.core.Activation object at 0x7f94c308be50>
[ 306 ]  <keras.layers.normalization.BatchNormalization object at 0x7f94c303ca90>
[ 307 ]  <keras.layers.core.Activation object at 0x7f94c344eed0>
[ 308 ]  <keras.layers.merge.Concatenate object at 0x7f94c329e6d0>
[ 309 ]  <keras.layers.merge.Concatenate object at 0x7f94c3055590>
[ 310 ]  <keras.layers.core.Activation object at 0x7f94c2fdd5d0>
[ 311 ]  <keras.layers.merge.Concatenate object at 0x7f94c2ff7910>
[ 312 ]  <keras.layers.pooling.GlobalAveragePooling2D object at 0x7f94c2e41a10>
[ 313 ]  <keras.layers.core.Dense object at 0x7f94c2e41a90>
[ 314 ]  <keras.layers.core.Dense object at 0x7f94c2e41110>

【讨论】:

以上是关于Inception-v3 迁移学习“冻结”层的主要内容,如果未能解决你的问题,请参考以下文章

Transfer Learning :迁移学习

tensorflow实现迁移学习

tensorflow实现迁移学习

关于 Keras 迁移学习的讨论

计算机视觉:用inception-v3模型重新训练自己的数据模型

pytorch如何冻结某层参数的实现