You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File "D:\go\code\segformer-pytorch-master\segformer-pytorch-master\train.py", line 237, in
cls_weights = np.ones([num_classes], np.float32)
File "F:\anaconda\envs\segformer\lib\site-packages\numpy\core\numeric.py", line 214, in ones
a = empty(shape, dtype, order)
TypeError: 'tuple' object cannot be interpreted as an integer
File "D:\go\code\segformer-pytorch-master\segformer-pytorch-master\train.py", line 237, in
cls_weights = np.ones([num_classes], np.float32)
File "F:\anaconda\envs\segformer\lib\site-packages\numpy\core\numeric.py", line 214, in ones
a = empty(shape, dtype, order)
TypeError: 'tuple' object cannot be interpreted as an integer
作者大大你好,我改用自己的数据训练模型,在train.py的cls_weights = np.ones([num_classes], np.float32)出现了问题。我是二分类问题。
The text was updated successfully, but these errors were encountered: