The error message "RuntimeError: stack expects each tensor to be equal size, but got [5, 34] at entry 0 and [4, 34] at entry 4" indicates that there are two tensors with different sizes being stacked together. Specifically, the first tensor has a shape of [5, 34] and the fourth tensor has a shape of [4, 34]. This is not allowed because PyTorch's stack operation requires all tensors to have the same size along the specified dimension.

RuntimeError stack expects each tensor to be equal size but got 5 34 at entry 0 and 4 34 at entry 4用英文回答

原文地址: http://www.cveoy.top/t/topic/beg5 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录