RuntimeError shape mismatch value tensor of shape 160 10 cannot be broadcast to indexing result of shape 160 5
This error message suggests that there is a shape mismatch between a value tensor and an indexing result. Specifically, the value tensor has a shape of [160, 10], while the indexing result has a shape of [160, 5]. This means that the value tensor has more columns than the indexing result.
This error can occur when trying to assign a value to a subset of a tensor using indexing. For example, if you have a tensor with shape [160, 5] and you try to assign a value of shape [160, 10] to a subset of it, you will get this error.
To fix this error, you need to make sure that the shape of the value tensor matches the shape of the subset of the tensor that you are trying to assign it to. You can do this by reshaping the value tensor or by selecting a different subset of the tensor.
原文地址: https://www.cveoy.top/t/topic/bDjj 著作权归作者所有。请勿转载和采集!