Skip to content

Commit

Permalink
#13405: Update batch size to 64 for Lenet model
Browse files Browse the repository at this point in the history
  • Loading branch information
sabira-mcw committed Nov 21, 2024
1 parent 6f67b9b commit bf301b1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions models/demos/lenet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion models/demos/lenet/demo/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
10 changes: 5 additions & 5 deletions models/demos/lenet/tests/test_perf_lenet.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -36,7 +36,7 @@ def get_expected_times(tt_lenet):

@pytest.mark.parametrize(
"batch_size",
[8],
[64],
)
@pytest.mark.parametrize(
"tt_lenet",
Expand Down Expand Up @@ -101,17 +101,17 @@ 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):
subdir = "tt_lenet"
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"]
Expand Down
2 changes: 1 addition & 1 deletion tests/ttnn/integration_tests/lenet/test_lenet.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit bf301b1

Please sign in to comment.