我有一个 RGB 图像张量为 (3,H,W),但 plt.imshow() 无法显示具有此形状的 RGB 图像。我想将张量更改为 (H,W,3)。我该怎么做,pytorch函数.view()可以做到这一点吗?
pip freeze > requirements.txt
Run Code Online (Sandbox Code Playgroud)
我使用此命令生成一些要求,但结果带有一些本地文件位置。如何避免它们?
absl-py @ file:///home/conda/feedstock_root/build_artifacts/absl-py_1637088766493/work
aiohttp @ file:///D:/bld/aiohttp_1637087223487/work
aiosignal @ file:///home/conda/feedstock_root/build_artifacts/aiosignal_1636093929600/work
albumentations==1.1.0
async-timeout @ file:///home/conda/feedstock_root/build_artifacts/async-timeout_1637092647930/work
attrs @ file:///home/conda/feedstock_root/build_artifacts/attrs_1620387926260/work
autopep8==1.6.0
backcall==0.2.0
Run Code Online (Sandbox Code Playgroud)
我不想要的“@file:///home/conda/feedstock_root/build_artifacts/attrs_1620387926260/work”。