diff --git a/models/demos/lenet/README.md b/models/demos/lenet/README.md index 0f6db2839eb3..4a6faab43800 100644 --- a/models/demos/lenet/README.md +++ b/models/demos/lenet/README.md @@ -7,9 +7,9 @@ The LeNet model is a foundational convolutional neural network (CNN) architecture that was specifically developed for handwritten digit recognition on the MNIST dataset. This pioneering model consists of several convolutional layers interspersed with pooling layers, followed by fully connected layers that output the final classification. By utilizing convolutional layers, LeNet effectively captures spatial hierarchies and local patterns in images, leading to significantly enhanced performance compared to traditional, simpler architectures. Its design laid the groundwork for many modern deep learning models used in image classification tasks today. -### Batch size: 8 +### Batch size: 64 -Batch Size determines the number of input sequences processed simultaneously during training or inference, impacting computational efficiency and memory usage. It's recommended to set the batch_size to 8 +Batch Size determines the number of input sequences processed simultaneously during training or inference, impacting computational efficiency and memory usage. It's recommended to set the batch_size to 64 ## How to Run diff --git a/models/demos/lenet/demo/demo.py b/models/demos/lenet/demo/demo.py index 60067f477e2b..814b978a8025 100644 --- a/models/demos/lenet/demo/demo.py +++ b/models/demos/lenet/demo/demo.py @@ -53,7 +53,7 @@ def run_demo_dataset(device, batch_size, iterations, model_location_generator, r @pytest.mark.parametrize("device_params", [{"l1_small_size": 32768}], indirect=True) -@pytest.mark.parametrize("batch_size", [8]) +@pytest.mark.parametrize("batch_size", [64]) @pytest.mark.parametrize("iterations", [1]) def test_demo_dataset( device, diff --git a/models/demos/lenet/tests/test_perf_lenet.py b/models/demos/lenet/tests/test_perf_lenet.py index 2b9e86706791..d64bb633f9d0 100644 --- a/models/demos/lenet/tests/test_perf_lenet.py +++ b/models/demos/lenet/tests/test_perf_lenet.py @@ -26,7 +26,7 @@ def get_expected_times(tt_lenet): if is_grayskull(): return { - tt_lenet: (3.7, 0.7), + tt_lenet: (7.525, 0.9495), }[tt_lenet] elif is_wormhole_b0(): return { @@ -36,7 +36,7 @@ def get_expected_times(tt_lenet): @pytest.mark.parametrize( "batch_size", - [8], + [64], ) @pytest.mark.parametrize( "tt_lenet", @@ -101,7 +101,7 @@ def test_perf_lenet(device, batch_size, tt_lenet, model_location_generator, rese @pytest.mark.parametrize( "batch_size", - [8], + [64], ) @pytest.mark.models_device_performance_bare_metal def test_perf_device_bare_metal(batch_size, reset_seeds): @@ -109,9 +109,9 @@ def test_perf_device_bare_metal(batch_size, reset_seeds): num_iterations = 1 margin = 0.03 if is_grayskull(): - expected_perf = 419.5 + expected_perf = 6330.022 elif is_wormhole_b0(): - expected_perf = 15975.52 + expected_perf = 20028.54 command = f"pytest tests/ttnn/integration_tests/lenet/test_lenet.py" cols = ["DEVICE FW", "DEVICE KERNEL", "DEVICE BRISC KERNEL"] diff --git a/tests/ttnn/integration_tests/lenet/test_lenet.py b/tests/ttnn/integration_tests/lenet/test_lenet.py index 7d57346e746c..eb585673bc27 100644 --- a/tests/ttnn/integration_tests/lenet/test_lenet.py +++ b/tests/ttnn/integration_tests/lenet/test_lenet.py @@ -14,7 +14,7 @@ @pytest.mark.parametrize( "batch_size", - [8], + [64], ) @pytest.mark.parametrize("device_params", [{"l1_small_size": 16384}], indirect=True) def test_lenet_inference(device, batch_size, model_location_generator, reset_seeds):