Skip to content
This repository was archived by the owner on Jun 28, 2024. It is now read-only.

Commit 5fad104

Browse files
committed
metrics: Update Tensorflow model name
This PR updates the Tensorflow model name instead of using the data format to have uniformity across the Tensorflow test that is using another model name like Axelnet. Fixes #5677 Signed-off-by: Gabriela Cervantes <[email protected]>
1 parent 00f0cda commit 5fad104

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

metrics/machine_learning/tensorflow.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ Usage: $0 <count> <timeout>
4141
EOF
4242
}
4343

44-
function nhwc_test() {
44+
function resnet50_test() {
4545
local CMD_RUN="cd benchmarks/scripts/tf_cnn_benchmarks/ && python tf_cnn_benchmarks.py -data_format=NHWC --device cpu --batch_size=${BATCH_SIZE} --num_batches=${NUM_BATCHES} > result"
46-
info "Running NHWC Tensorflow test"
46+
info "Running Resnet50 Tensorflow test"
4747
for i in "${containers[@]}"; do
4848
sudo -E "${CTR_EXE}" t exec -d --exec-id "$(random_name)" "${i}" sh -c "${CMD_RUN}"
4949
done
@@ -61,14 +61,14 @@ function nhwc_test() {
6161
sudo -E "${CTR_EXE}" t exec --exec-id "$(random_name)" "${i}" sh -c "${CMD_RESULT}" >> "${tensorflow_file}"
6262
done
6363

64-
local nhwc_results=$(cat "${tensorflow_file}" | grep "total images/sec" | cut -d ":" -f2 | sed -e 's/^[ \t]*//' | tr '\n' ',' | sed 's/.$//')
65-
local average_nhwc=$(echo "${nhwc_results}" | sed "s/,/+/g;s/.*/(&)\/$NUM_CONTAINERS/g" | bc -l)
64+
local resnet50_results=$(cat "${tensorflow_file}" | grep "total images/sec" | cut -d ":" -f2 | sed -e 's/^[ \t]*//' | tr '\n' ',' | sed 's/.$//')
65+
local average_resnet50=$(echo "${resnet50_results}" | sed "s/,/+/g;s/.*/(&)\/$NUM_CONTAINERS/g" | bc -l)
6666

6767
local json="$(cat << EOF
6868
{
69-
"NHWC": {
70-
"Result": "${nhwc_results}",
71-
"Average": "${average_nhwc}",
69+
"Resnet50": {
70+
"Result": "${resnet50_results}",
71+
"Average": "${average_resnet50}",
7272
"Units": "s"
7373
}
7474
}
@@ -158,7 +158,7 @@ function main() {
158158
# Check that the requested number of containers are running
159159
check_containers_are_up
160160

161-
nhwc_test
161+
resnet50_test
162162

163163
axelnet_test
164164

0 commit comments

Comments
 (0)