mlcommons / mlcommons/tiny

Inconsistency with bias enabled in the pytorch model (Conv2d) for image classification

Open
#147 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
479
Forks
116
PR merge metrics
No merged PRs in 30d

Description

Hello,

I am interested in running the image classification model to benchmark our accelerator and, currently, my environment is in pytorch therefore, I had a look at your experimental model under:
/tiny/benchmark/experimental/training_torch/image_classification/utils/model.py

The model contains ResNetBlock with two Conv2d convolutions followed per Batch Normalization. However, each Conv2d layer is configured with the bias enabled (bias=True) which is inconsistent with the Con2d layers in the Keras model that don't have the use_bias flag enabled (also it is not coherent with the purpose of batch normalization layer that follows).

Thank you,
Best regards,
Jean-Baptiste

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with /tiny/benchmark/experimental/training_torch/image_classification/utils/model.py and inspect the ResNetBlock Conv2d and BatchNorm definitions. Compare their configuration with the corresponding Keras model, then run the relevant image-classification checks if available. Done means the PyTorch and Keras convolution configurations are consistent around batch normalization.

Written by the indexing model from the issue text.

Assessment

Tech stack
keras, pytorch
Domain
machine-learning
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.