Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiple outputs not supported? #80

Open
muzafferkal opened this issue Mar 25, 2023 · 1 comment
Open

multiple outputs not supported? #80

muzafferkal opened this issue Mar 25, 2023 · 1 comment
Assignees
Labels

Comments

@muzafferkal
Copy link

muzafferkal commented Mar 25, 2023

Bug description

If a network returns multiple outputs, the forward hook at crawler.py:181 crashes because the out parameter is a tuple and not a tensor so it doesn't support .size() method. Are module returning multiple outputs supported and I'm doing wrong or is this a bug?
Thanks.

Code snippet to reproduce the bug

out_h, out_o = model(x_crnt, x_prev, init_h, init_o)

Error traceback

  File "/local/home/...../lib64/python3.7/site-packages/torchscan/crawler.py", line 189, in _fwd_hook
    info[fw_idx]["output_shape"] = (-1, *out.shape[1:])
AttributeError: 'tuple' object has no attribute 'shape'

Environment

Collecting environment information...
TorchScan version: 0.1.2
PyTorch version: 1.8.1+cu102

OS: Amazon Linux 2

Python version: 3.7.16
Is CUDA available: Yes
CUDA runtime version: Could not collect
GPU models and configuration: 
GPU 0: Tesla V100-SXM2-16GB
GPU 1: Tesla V100-SXM2-16GB
GPU 2: Tesla V100-SXM2-16GB
GPU 3: Tesla V100-SXM2-16GB

Nvidia driver version: 525.60.13
cuDNN version: Could not collect
@muzafferkal muzafferkal added the bug Something isn't working label Mar 25, 2023
@frgfm
Copy link
Owner

frgfm commented Jan 27, 2024

Hey there @muzafferkal 👋

My apologies about the very late reply! Could you share a minimal reproducible snippet?
I understand that your issue is with a model that has mutiple inputs to custom PyTorch modules. But additional context & snippet would help to come up with the best solution!

Cheers ✌️

@frgfm frgfm added awaiting response module: crawler Related to crawler and removed bug Something isn't working labels Jan 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants