<iframe src="https://jovian.ml/embed?url=https://jovian.ml/pravin-bnmit/cxr/v/1&cellId=15" title="Jovian Viewer" height="800" width="800" frameborder="0" scrolling="auto"></iframe>
def show_sample(img, target, invert=True):
if invert:
plt.imshow(1 - img.permute((1, 2, 0)))
else:
plt.imshow(img.permute(1, 2, 0))
print('Labels:', decode_target(target, text_labels=True))
尝试显示图像,但在通道定义正确时出现尺寸错误
我认为问题是,你有一个3D阵列,你想打印,但你需要2D。 尝试使用np.reforme()将形状更改为1024x1024
相关问题 更多 >
编程相关推荐