[AIFFEL] 22.Mar.17, GD_ResNet_Ablation_Study
5624 ワード
今日の学習リスト
fig = tfds.show_examples(ds_train, ds_info)
tfds.visualization.show_examples(
ds: tf.data.Dataset,
ds_info: tfds.core.DatasetInfo,
**options_kwargs
)
KerasTensor
とTensor
は違いますtf.keras.Model
Model
groups layers into an object with training and inference features. Layer
, Module
padding
strides
一緒にいるときに混同してしまうとinput_shape = (4, 32, 32, 3)
x = tf.random.normal(input_shape)
y = tf.keras.layers.Conv2D(
3, 3, activation='relu', padding='same' strides=2, input_shape=input_shape[1:])(x)
print(y.shape)
ResNet実装
conv blockの実装
BN&アクティブな場所とタイプ
normalization (BN) [16] right after each convolution and
前のアクティブ化、後の[16]
Shortcut接続の実装
p 3. "The operation F+xF +\mathbf{x}F+x is performed by a shortcut
connection and element-wise addition. We adopt the second
nonlinearity after the addition (i.e., (y), see Fig. 2)."
p 3. _"The dimensions of x\mathbf{x}x and FFF must be equal in Eqn.(1).
If this is not the case (e.g., when changing the input/output
channels), we can perform a linear projection WsW_sWs by the
shortcut connections to match the dimensions:"
p 4. "When the dimensions increase (dotted line shortcuts
in Fig. 3), we consider two options: (A) The shortcut still
performs identity mapping, with extra zero entries padded
for increasing dimensions. This option introduces no extra
parameter; (B) The projection shortcut in Eqn.(2) is used to
match dimensions (done by 1 x 1 convolutions)."
p 5. "In the first comparison (Table 2 and Fig. 4 right),
we use identity mapping for all shortcuts and zero-padding
for increasing dimensions (option A)"-> ResNet-34
p 6. "In Table 3 we
compare three options: (A) zero-padding shortcuts are used
for increasing dimensions, and all shortcuts are parameterfree
(the same as Table 2 and Fig. 4 right); (B) projection
shortcuts are used for increasing dimensions, and other
shortcuts are identity; and (C) all shortcuts are projections.... So we
do not use option C in the rest of this paper,"
1つの関数でResNet-34とResNet-50を有効にします.
Reference
この問題について([AIFFEL] 22.Mar.17, GD_ResNet_Ablation_Study), 我々は、より多くの情報をここで見つけました https://velog.io/@moondeokjong/AIFFEL-22.Mar.17-GDResNetAblationStudyテキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol