Fix 'RecursiveScriptModule' object has no attribute 'forward' in demucs (#564)
Summary:
This fixes the following error when trying to do correctness checking on model outputs:
```
File "./torchbench.py", line 348, in <module>
main()
File "./torchbench.py", line 303, in main
correct_result = copy.deepcopy(model)(*example_inputs)
File "/home/jansel/conda/envs/torchbenchmark/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "/home/jansel/torchbenchmark/torchbenchmark/models/demucs/__init__.py", line 36, in forward
return sources, self.model(mix)
File "/home/jansel/conda/envs/torchbenchmark/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1105, in _call_impl
forward_call = (self._slow_forward if torch._C._get_tracing_state() else self.forward)
File "/home/jansel/conda/envs/torchbenchmark/lib/python3.8/site-packages/torch/jit/_script.py", line 757, in __getattr__
return super(RecursiveScriptModule, self).__getattr__(attr)
File "/home/jansel/conda/envs/torchbenchmark/lib/python3.8/site-packages/torch/jit/_script.py", line 474, in __getattr__
return super(ScriptModule, self).__getattr__(attr)
File "/home/jansel/conda/envs/torchbenchmark/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1185, in __getattr__
raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'RecursiveScriptModule' object has no attribute 'forward'
```
Pull Request resolved: https://github.com/pytorch/benchmark/pull/564
Reviewed By: anijain2305
Differential Revision: D35272707
Pulled By: jansel
fbshipit-source-id: c5158ec82c9971e8c17a847c3dad01b99323e5bd