frgfm / torch-scan

Seamless analysis of your PyTorch models (RAM usage, FLOPs, MACs, receptive field, etc.)
https://frgfm.github.io/torch-scan/
Apache License 2.0
207 stars 22 forks source link

add `input_data` with in summary #83

Open qmpzzpmq opened 1 year ago

qmpzzpmq commented 1 year ago

🚀 Feature

same as the input_data as it in https://github.com/TylerYep/torchinfo

Motivation & pitch

for seq2seq task, some times xs xs_len are related, so I want genertaed by myself.

Alternatives

No response

Additional context

No response

frgfm commented 1 year ago

Hey @qmpzzpmq :wave:

Sorry about the late reply! So in short that would be a way to get more flexibility over the input_shape of the summary function, correct?

Do you have a short snippet where the current API fails so that I can make sure to come up with a proper design proposition?

qmpzzpmq commented 1 year ago

for example in common multiple input in seq2se, xs and its length xs_len as inputs of model. There is a nature contrain as xs.shape.max() = xs_len.max(), which cannot be implemented in current API.