torch.numel作用

torch.numel用于统计张量中元素的个数

t = torch.randn((2,3,4))
t.numel()

在这里插入图片描述

你可能感兴趣的:(pytorch,深度学习,python,人工智能)