Noonisy
Do U Know(2022-12-07)
2022-12-07
阅读:367

DO U KNOW?


1.matplotlib中,plt.imshow()长宽比例失衡
# 修改前
plt.figure(figsize=(16,8))
x=torch.randint(0, 2048, size=(49, 2048))
plt.imshow(x)
plt.show()
before
# 修改后
plt.figure(figsize=(16,8))
x=torch.randint(0, 2048, size=(49, 2048))
plt.imshow(x, aspect='auto)  # 加上 'auto'
plt.show()
after
最后编辑于:2022 年 12 月 07 日 14:22
邮箱格式错误
网址请用http://或https://开头