Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Fix model output shape retrieval during flops calculation #556

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

miteshksingh
Copy link

@miteshksingh miteshksingh commented Jul 1, 2020

Summary:

Problem

Output of a model can be Dict as well. L350 of generic/profiler.py assumes the output to be a tensor, thus failing whenever model output is a Dict.

Solution

Use get_input_shape function (added recently in D21702925 (f0528a1)) to get the shape of output. Updated the function name to get_shape to include both input and output.

Differential Revision: D22327937

Summary: Use get_input_shape function (added recently in D21702925 (facebookresearch@f0528a1)) to get the shape of output. Updated the function name to get_shape to include both input and output.

Differential Revision: D22327937

fbshipit-source-id: 321deffde974f267edcf9e1b7ca773d4df7444b7
@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported labels Jul 1, 2020
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D22327937

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants