Repository: pytorch/benchmark
Issue: AttributeError: 'Model' object has no attribute 'flops'
Root cause: Validation Gap

I'm running
`python run.py -t eval -d cuda  resnet50 --flops mode`
and get
```
Traceback (most recent call last):
  File "run.py", line 237, in <module>
    model_flops = m.get_flops()
  File "/benchmark/torchbenchmark/util/framework/vision/model_factory.py", line 38, in get_flops
    flops = self.flops / self.batch_size * flops_fma
AttributeError: 'Model' object has no attribute 'flops
```
So, it seems ResNet50 model doesn't contain flops variable after initialize
My env is below

```
Collecting environment information...
PyTorch version: 1.13.0.dev20220731+cu113
Is debug build: False
CUDA used to build PyTorch: 11.3
ROCM used to build PyTorch: N/A

OS: Ubuntu 20.04.4 LTS (x86_64)
GCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Clang version: 13.0.0 (https://github.com/llvm/llvm-project.git d7b669b3a30345cfcdb2fde2af6f48aa4b94845d)
CMake version: version 3.23.3
Libc version: glibc-2.31

Python version: 3.8.13 (default, Mar 28 2022, 11:38:47)  [GCC 7.5.0] (64-bit runtime)
Python platform: Linux-5.4.0-122-generic-x86_64-with-glibc2.17
Is CUDA available: True
CUDA runtime version: 11.7.64
GPU models and configuration:

GPU 2: NVIDIA A100 80GB PCIe


Nvidia driver version: 515.48.07
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.8.4.1
/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.4.1
/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.4.1
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.4.1
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.4.1
/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.4.1
/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.4.1
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] bert-pytorch==0.0.1a4
[pip3] mypy-extensions==0.4.3
[pip3] numpy==1.21.2
[pip3] pytorch-transformers==1.2.0
[pip3] torch==1.13.0.dev20220731+cu113
[pip3] torch-struct==0.5
[pip3] torchfile==0.1.0
[pip3] torchmetrics==0.9.3
[pip3] torchrec-nightly==2022.7.31
[pip3] torchtext==0.14.0.dev20220731
[pip3] torchvision==0.14.0.dev20220731+cu113
[pip3] torchx-nightly==2022.7.31
[conda] bert-pytorch              0.0.1a4                   dev_0    <develop>
[conda] numpy                     1.21.2                   pypi_0    pypi
[conda] pytorch-transformers      1.2.0                    pypi_0    pypi
[conda] torch                     1.13.0.dev20220731+cu113          pypi_0    pypi
[conda] torch-struct              0.5                      pypi_0    pypi
[conda] torchfile                 0.1.0                    pypi_0    pypi
[conda] torchmetrics              0.9.3                    pypi_0    pypi
[conda] torchrec-nightly          2022.7.31                pypi_0    pypi
[conda] torchtext                 0.14.0.dev20220731          pypi_0    pypi
[conda] torchvision               0.14.0.dev20220731+cu113          pypi_0    pypi
[conda] torchx-nightly            2022.7.31                pypi_0    pypi
```


Can you try if https://github.com/pytorch/benchmark/pull/748/files fixes your problem? Note that we rename the `--flops model` to `--flops fvcore`.

Merged https://github.com/pytorch/benchmark/pull/748, can you help confirm that the problem is now fixed?

Works good  for me, thanks!