Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
andrey-churkin committed Jan 21, 2025
1 parent 3f2f52e commit cfca29e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def preprocess_for_train(image, label):


train_dataset = tfds.load("imagenette/320px-v2", split="train", shuffle_files=True, as_supervised=True)
train_dataset = train_dataset.map(preprocess_for_train).shuffle(1024).batch(32)
train_dataset = train_dataset.map(preprocess_for_train).batch(64)

val_dataset = tfds.load("imagenette/320px-v2", split="validation", shuffle_files=False, as_supervised=True)
val_dataset = val_dataset.map(preprocess_for_eval).batch(128)
Expand Down Expand Up @@ -150,7 +150,7 @@ def transform_fn(data_item):
tf_quantized_model = nncf.quantize(tf_model, calibration_dataset)

tf_quantized_model.compile(
optimizer=tf.keras.optimizers.Adam(learning_rate=1e-5),
optimizer=tf.keras.optimizers.RMSprop(learning_rate=1e-4),
loss=tf.keras.losses.CategoricalCrossentropy(),
metrics=[tf.keras.metrics.CategoricalAccuracy()],
)
Expand Down
4 changes: 2 additions & 2 deletions tests/cross_fw/examples/example_scope.json
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,8 @@
"cpu": "Intel(R) Core(TM) i9-10980XE CPU @ 3.00GHz",
"accuracy_metrics": {
"fp32_top1": 0.987770676612854,
"int8_top1": 0.9717197418212891,
"accuracy_drop": 0.01605093479156494
"int8_top1": 0.9727388620376587,
"accuracy_drop": 0.015031814575195312
},
"performance_metrics": {
"fp32_fps": 1703.04,
Expand Down

0 comments on commit cfca29e

Please sign in to comment.