Comments (4)
好的,我晚上会检查一下,因为显存占用问题,之前都是用的batch_size=1,没有考虑到>1的情况,不好意思
from dsen2_cr_pytorch.
非常感谢光速回复,期待你的分享
from dsen2_cr_pytorch.
img_out=utility.GetQuadrupletsImg(inputdata, fake_img, s2img, s2CSMimg)
-
报错的这行操作的意义是将(原来有云图片、神经网络去云结果、原来的地面实景,云掩膜)这四个图片拼接在一起存到img_out中,然后发到visdom里面,可以实时看到结果。
-
当batch_size为1的时候,utils/utils.py里面175、 176 、178行的 t.squeeze操作就能将维度 [1,13,256,256]压缩成[13,256,256],当batch_size为5的时候,t.squeeze操作就没有用了,维度还是[5,13,256,256],所以就会出错,所以你需要保证: utility.GetQuadrupletsImg的四个参数,他们的第一个维度是1
-
解决方法:神经网络输出了5张图片,我们需要输出图片进行定性分析,只取一张输出到visdom里面就行了,所以可以改成
img_out=utility.GetQuadrupletsImg(inputdata[0:1,:,:,:], fake_img[0:1,:,:,:], s2img[0:1,:,:,:], s2CSMimg[0:1,:,:,:]),我们就取第一张图片输出一下。 -
关于调参的问题:这篇论文里面的可以操作的东西比较少,只有config.py里面的 第25,26,31,32,35行这些影响训练效果的参数(其余的参数如save_frequency都是不影响效果的)是我自己拟定的,其余的论文中都给出来了,包括resnet的层数和resnet的feature_size。至于作者有没有对数据集进行一些预处理操作,我也记不清了,dataloader是那个数据集下载网站提供的,我在这个基础上修改了一下,应该没啥问题。
from dsen2_cr_pytorch.
img_out=utility.GetQuadrupletsImg(inputdata, fake_img, s2img, s2CSMimg)
- 报错的这行操作的意义是将(原来有云图片、神经网络去云结果、原来的地面实景,云掩膜)这四个图片拼接在一起存到img_out中,然后发到visdom里面,可以实时看到结果。
- 当batch_size为1的时候,utils/utils.py里面175、 176 、178行的 t.squeeze操作就能将维度 [1,13,256,256]压缩成[13,256,256],当batch_size为5的时候,t.squeeze操作就没有用了,维度还是[5,13,256,256],所以就会出错,所以你需要保证: utility.GetQuadrupletsImg的四个参数,他们的第一个维度是1
- 解决方法:神经网络输出了5张图片,我们需要输出图片进行定性分析,只取一张输出到visdom里面就行了,所以可以改成
img_out=utility.GetQuadrupletsImg(inputdata[0:1,:,:,:], fake_img[0:1,:,:,:], s2img[0:1,:,:,:], s2CSMimg[0:1,:,:,:]),我们就取第一张图片输出一下。- 关于调参的问题:这篇论文里面的可以操作的东西比较少,只有config.py里面的 第25,26,31,32,35行这些影响训练效果的参数(其余的参数如save_frequency都是不影响效果的)是我自己拟定的,其余的论文中都给出来了,包括resnet的层数和resnet的feature_size。至于作者有没有对数据集进行一些预处理操作,我也记不清了,dataloader是那个数据集下载网站提供的,我在这个基础上修改了一下,应该没啥问题。
明白了,感谢详尽的解释,受益良多👍
from dsen2_cr_pytorch.
Related Issues (6)
- 询问数据集 HOT 2
- 数据集 HOT 8
- predict.py报错 HOT 2
- 损失函数 HOT 4
- The size of tensor a (13) must match the size of tensor b (15) at non-singleton dimension 1 HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dsen2_cr_pytorch.