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

Function model

tools/tensorflow-quantization/docs/source/notebooks/tiny_resnet.py:57–73  ·  view source on GitHub ↗

Dummy network with resnet-like architecture.

()

Source from the content-addressed store, hash-verified

55
56
57def model():
58 """
59 Dummy network with resnet-like architecture.
60 """
61 input_img = tf.keras.layers.Input(shape=(32, 32, 3))
62 x = tf.keras.layers.Conv2D(filters=12, kernel_size=(3, 3))(input_img)
63 x = tf.keras.layers.ReLU()(x)
64 x = tf.keras.layers.Conv2D(filters=24, kernel_size=(3, 3))(x)
65 x = tf.keras.layers.ReLU()(x)
66 x = identity_block(x)
67 x = identity_block_short_conv(x)
68 x = tf.keras.layers.MaxPooling2D(pool_size=(2, 2))(x)
69 x = tf.keras.layers.Flatten()(x)
70 x = tf.keras.layers.Dense(100)(x)
71 x = tf.keras.layers.ReLU()(x)
72 x = tf.keras.layers.Dense(10)(x)
73 return tf.keras.Model(input_img, x, name="Dummy_Model")
74
75
76def optimizer(lr=0.001):

Callers 9

test_native_amp_fp16Method · 0.85
test_aspMethod · 0.85
collect_statsFunction · 0.85
trainFunction · 0.85
testFunction · 0.85
test_engineFunction · 0.85
validateFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85

Calls 2

identity_blockFunction · 0.85

Tested by 3

test_native_amp_fp16Method · 0.68
test_aspMethod · 0.68
test_engineFunction · 0.68