Skip to content

Conversation

ajaynarayanan
Copy link

I faced three issues in the case of multiple inputs for the model,

  1. 'total_input_size' was incorrectly calculated by multiplying all the tuple values of 'input_size'. Suppose, model's forward function requires 2 params of say size [(3, 256, 128), (3, 256, 128)]. Total_input_size was calculated by multiplying all the values { 3x256x128x3x256x128 } instead of multiplying each tuples and adding them { 3x256x128 + 3x256x128 }. The issue was fixed by multiplying tuple and adding them.
  2. The 'total_params' were incorrectly calculated for multiple inputs case, fixed it by calculating from the model directly.
  3. 'summary[layer]["output_shape"]' needed to be flattened for computing 'total_output'. This was fixed by using 'funcy' package's flatten method.

@JayJJChen
Copy link

JayJJChen commented Sep 10, 2019

the Multiple Inputs demo error in read me is actually caused by this bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants