作者您好!在绘制图片的时候,遇到了如下问题,希望您有空能够帮忙解答一下!
IndexError Traceback (most recent call last)
/tmp/ipykernel_25/2069759544.py in
611 print(y.shape[0])
612 print(y.shape[1])
--> 613 get_cls_map(net, device, all_data_loader, y_all)
/tmp/ipykernel_25/2069759544.py in get_cls_map(net, device, all_data_loader, y)
113
114 y_pred, y_new = test(device, net, all_data_loader)
--> 115 cls_labels = get_classification_map(y_pred, y)
116 x = np.ravel(cls_labels)
117 gt = y.flatten()
/tmp/ipykernel_25/2069759544.py in get_classification_map(y_pred, y)
21
22 height = y.shape[0]
---> 23 width = y.shape[1]
24 k = 0
25 cls_labels = np.zeros((height, width))
IndexError: tuple index out of range
tuple index out of range
作者您好!在绘制图片的时候,遇到了如下问题,希望您有空能够帮忙解答一下!
IndexError Traceback (most recent call last)
/tmp/ipykernel_25/2069759544.py in
611 print(y.shape[0])
612 print(y.shape[1])
--> 613 get_cls_map(net, device, all_data_loader, y_all)
/tmp/ipykernel_25/2069759544.py in get_cls_map(net, device, all_data_loader, y)
113
114 y_pred, y_new = test(device, net, all_data_loader)
--> 115 cls_labels = get_classification_map(y_pred, y)
116 x = np.ravel(cls_labels)
117 gt = y.flatten()
/tmp/ipykernel_25/2069759544.py in get_classification_map(y_pred, y)
21
22 height = y.shape[0]
---> 23 width = y.shape[1]
24 k = 0
25 cls_labels = np.zeros((height, width))
IndexError: tuple index out of range
tuple index out of range