Skip to content

add to optimize tta#362

Merged
Nic-Ma merged 4 commits intoNic-Ma:optimize-ttafrom
rijobro:add-to-optimize-tta
Jan 31, 2022
Merged

add to optimize tta#362
Nic-Ma merged 4 commits intoNic-Ma:optimize-ttafrom
rijobro:add-to-optimize-tta

Conversation

@rijobro
Copy link
Copy Markdown

@rijobro rijobro commented Jan 28, 2022

  1. Test input to TTA with np.ndarray, torch.Tensor (cpu) and torch.Tensor (gpu).
  2. Reduce data type conversion.

Signed-off-by: Richard Brown <[email protected]>
mean = output.mean(0)
std = output.std(0)
vvc = output.std() / output.mean()
vvc = vvc.item() if isinstance(vvc, torch.Tensor) else vvc
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @rijobro ,

I think numpy array also has the item() function?

Others look good to me.

Thanks.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, updated.

Signed-off-by: Richard Brown <[email protected]>
@Nic-Ma Nic-Ma merged commit b94b601 into Nic-Ma:optimize-tta Jan 31, 2022
@rijobro rijobro deleted the add-to-optimize-tta branch May 19, 2022 11:06
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