facebookresearch / facebookresearch/SlowFast
Minor issues on `PatchEmbed` code
Open
- Dominant language
- Python
- Stars
- 7.4k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
https://github.com/facebookresearch/SlowFast/blob/5b5d9ecb15a54188943af0cbf5f7c420d8409018/slowfast/models/stem_helper.py#L325
in this line if `keep_spatial` is `False`, module flattens and transposes output tensor and return it with its shape. However according to the original code `return x.flatten(2).transpose(1, 2), x.shape` won't return its changed shape. It will always returns original output `x`'s shape. If the purpose is returning changed shape, then the code should be like
```python
x = x.flatten(2).transpose(1, 2)
return x, x.shape
```
Contributor guide
Assessment
This issue has not been assessed yet.