python - PyTorch 中是否有提取图像补丁的功能?

标签 python tensorflow pytorch

给定一批图像,我想提取所有可能的图像 block ,类似于卷积。在 TensorFlow 中,我们可以使用 tf.extract_image_patches为达到这个。 PyTorch 中是否有等效的函数?

谢谢。

最佳答案

不幸的是,可能没有直接的方法来实现您的目标。
但 Tensor.unfold 函数可能是一个解决方案。
https://discuss.pytorch.org/t/how-to-extract-smaller-image-patches-3d/16837/2
该网站可能对您有所帮助。

关于python - PyTorch 中是否有提取图像补丁的功能?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45828265/

相关文章:

python - 存储程序序列的数据结构 - Python

tensorflow - 将 What if 工具与 xgboost 结合使用

python - 如何将列表分配给 torch.tensor?

python - Tensorflow 中的 Conv1D 混淆

python - torch 错误,运行时错误: expected scalar type Long but found Double

pytorch - pytorch conv2d的源代码在哪里?

python - Pandas Column 数学运算 没有错误没有答案

python - 高效构建 FEM/FVM 矩阵

python - 求函数在给定区间内的根

python - 如何设计神经网络来识别不同的特征?