MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT / inception_block

Function inception_block

tools/tensorflow-quantization/tests/network_pool.py:153–176  ·  view source on GitHub ↗

Inception block from GoogleNet

(input_tensor)

Source from the content-addressed store, hash-verified

151
152
153def inception_block(input_tensor):
154 """
155 Inception block from GoogleNet
156 """
157 b1x1 = tf.keras.layers.Conv2D(filters=12, kernel_size=(1, 1), padding="same")(
158 input_tensor
159 )
160 b1x1 = relu_bn(b1x1)
161
162 b5x5 = tf.keras.layers.Conv2D(filters=12, kernel_size=(1, 1), padding="same")(
163 input_tensor
164 )
165 b5x5 = tf.keras.layers.Conv2D(filters=24, kernel_size=(5, 5), padding="same")(b5x5)
166 b5x5 = relu_bn(b5x5)
167
168 b3x3 = tf.keras.layers.Conv2D(filters=12, kernel_size=(1, 1), padding="same")(
169 input_tensor
170 )
171 b3x3 = tf.keras.layers.Conv2D(filters=20, kernel_size=(3, 3), padding="same")(b3x3)
172 b3x3 = tf.keras.layers.Conv2D(filters=24, kernel_size=(3, 3), padding="same")(b3x3)
173 b3x3 = relu_bn(b3x3)
174
175 out = tf.keras.layers.Concatenate()([b1x1, b5x5])
176 return out
177
178
179def identity_block_bn(input_tensor):

Callers 1

merry_28_28Function · 0.85

Calls 1

relu_bnFunction · 0.85

Tested by

no test coverage detected