我是靠谱客的博主 落寞月光,这篇文章主要介绍使用nn.BatchNorm1d出现RuntimeError: running_mean should contain 1 elements not 512错误,现在分享给大家,希望可以做个参考。

pytorch模型中添加batchnorm过程中出现错误RuntimeError: running_mean should contain 1 elements not 512,错误来自于nn.BatchNorm1d(N),其中N=channels
解决办法:
将输入重新排列

video = video.view(-1, video.shape[-1])

最后

以上就是落寞月光最近收集整理的关于使用nn.BatchNorm1d出现RuntimeError: running_mean should contain 1 elements not 512错误的全部内容,更多相关使用nn.BatchNorm1d出现RuntimeError:内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(57)

评论列表共有 0 条评论

立即
投稿
返回
顶部