MinkowskiPooling池化(下)

MinkowskiPoolingTranspose
class MinkowskiEngine.MinkowskiPoolingTranspose(kernel_size, stride, dilation=1, kernel_generator=None, dimension=None)
稀疏张量的池转置层。
展开功能,然后将其除以贡献的非零元素的数量。
init(kernel_size, stride, dilation=1, kernel_generator=None, dimension=None)
用于稀疏张量的高维解卷层。
Args:
kernel_size (int, optional): 输出张量中内核的大小。如果未提供,则region_offset应该是 RegionType.CUSTOM并且region_offset应该是具有大小的2D矩阵N×D 这样它列出了所有D维度的 N 偏移量。.
stride (int, or list, optional): stride size of the convolution layer. If non-identity is used, the output coordinates will be at least stride ×× tensor_stride away. When a list is given, the length must be D; each element will be used for stride size for the specific axis.
dilation (int, or list, optional): 卷积内核的扩展大小。给出列表时,长度必须为D,并且每个元素都是轴特定的膨胀。所有元素必须> 0。
kernel_generator (MinkowskiEngine.KernelGenerator, optional): 定义自定义内核形状。
dimension(int):定义所有输入和网络的空间的空间尺寸。例如,图像在2D空间中,网格和3D形状在3D空间中。
cpu() → T
将所有模型参数和缓冲区移至CPU。
返回值:
模块:self
cuda(device: Optional[Union[int, torch.device]] = None) → T
将所有模型参数和缓冲区移至GPU。
这也使关联的参数并缓冲不同的对象。因此,在构建优化程序之前,如果模块在优化过程中可以在GPU上运行,则应调用它。
参数:
设备(整数,可选):如果指定,则所有参数均为
复制到该设备
返回值:
模块:self
double() →T
将所有浮点参数和缓冲区强制转换为double数据类型。
返回值:
模块:self
float() →T
将所有浮点参数和缓冲区强制转换为float数据类型。
返回值:
模块:self
forward(input: SparseTensor.SparseTensor, coords: Union[torch.IntTensor, MinkowskiCoords.CoordsKey, SparseTensor.SparseTensor] = None)
input (MinkowskiEngine.SparseTensor): Input sparse tensor to apply a convolution on.
coords ((torch.IntTensor, MinkowskiEngine.CoordsKey, MinkowskiEngine.SparseTensor), optional): If provided, generate results on the provided coordinates. None by default.
to(*args, **kwargs)
Moves and/or casts the parameters and buffers.
This can be called as
to(device=None, dtype=None, non_blocking=False)
to(dtype, non_blocking=False)
to(tensor, non_blocking=False)
to(memory_format=torch.channels_last)
其签名类似于torch.Tensor.to(),但仅接受所需dtype的浮点s。另外,此方法将仅将浮点参数和缓冲区强制转换为dtype (如果给定的话)。device如果给定了整数参数和缓冲区 ,但dtype不变。当 non_blocking被设置时,它试图转换/如果可能异步相对于移动到主机,例如,移动CPU张量与固定内存到CUDA设备。
请参见下面的示例。
Args:
device (torch.device): the desired device of the parameters
and buffers in this module
dtype (torch.dtype): the desired floating point type of
the floating point parameters and buffers in this module
tensor (torch.Tensor): Tensor whose dtype and device are the desired
dtype and device for all parameters and buffers in this module
memory_format (torch.memory_format): the desired memory
format for 4D parameters and buffers in this module (keyword only argument)
Returns:
Module: self
Example:

linear = nn.Linear(2, 2)
linear.weight
Parameter containing:
tensor([[ 0.1913, -0.3420],
[-0.5113, -0.2325]])

linear.to(torch.double)
Linear(in_features=2, out_features=2, bias=True)

linear.weight
Parameter containing:
tensor([[ 0.1913, -0.3420],
[-0.5113, -0.2325]], dtype=torch.float64)

gpu1 = torch.device(“cuda:1”)
linear.to(gpu1, dtype=torch.half, non_blocking=True)
Linear(in_features=2, out_features=2, bias=True)

linear.weight
Parameter containing:
tensor([[ 0.1914, -0.3420],
[-0.5112, -0.2324]], dtype=torch.float16, device=‘cuda:1’)

cpu = torch.device(“cpu”)
linear.to(cpu)
Linear(in_features=2, out_features=2, bias=True)

linear.weight
Parameter containing:
tensor([[ 0.1914, -0.3420],
[-0.5112, -0.2324]], dtype=torch.float16)
type(dst_type: Union[torch.dtype, str]) → T
Casts all parameters and buffers to dst_type.
Arguments:
dst_type (type or string): the desired type
Returns:
Module: self
MinkowskiGlobalPooling
class MinkowskiEngine.MinkowskiGlobalPooling(average=True, mode=<GlobalPoolingMode.AUTO: 0>)
将所有输入功能集中到一个输出。

将稀疏坐标减少到原点,即将每个点云减少到原点,返回batch_size点的数量[[0,0,…,0],[0,0,…,1] , [0, 0,…,2]],其中坐标的最后一个元素是批处理索引。
Args:
average (bool): 当为True时,返回平均输出。如果不是,则返回所有输入要素的总和。
cpu() → T
将所有模型参数和缓冲区移至CPU。
返回值:
模块:自我
Module: self
cuda(device: Optional[Union[int, torch.device]] = None) → T
将所有模型参数和缓冲区移至GPU。
这也使关联的参数并缓冲不同的对象。因此,在构建优化程序之前,如果模块在优化过程中可以在GPU上运行,则应调用它。
参数:
device (int, optional): if specified, all parameters will be
copied to that device
Returns:
Module: self
double() → T
将所有浮点参数和缓冲区强制转换为double数据类型。
Returns:
Module: self
float() → T
将所有浮点参数和缓冲区强制转换为float数据类型。
返回值:
模块:self
forward(input)
to(*args, **kwargs)
移动和/或强制转换参数和缓冲区。
这可以称为
to(device=None, dtype=None, non_blocking=False)
to(dtype, non_blocking=False)
to(tensor, non_blocking=False)
to(memory_format=torch.channels_last)
其签名类似于torch.Tensor.to(),但仅接受所需dtype的浮点s。另外,此方法将仅将浮点参数和缓冲区强制转换为dtype (如果给定的话)。device如果给定了整数参数和缓冲区 ,dtype不变。当 non_blocking被设置时,它试图转换/如果可能异步相对于移动到主机,例如,移动CPU张量与固定内存到CUDA设备。
请参见下面的示例。
Args:
device (torch.device): the desired device of the parameters
and buffers in this module
dtype (torch.dtype): the desired floating point type of
the floating point parameters and buffers in this module
tensor (torch.Tensor): Tensor whose dtype and device are the desired
dtype and device for all parameters and buffers in this module
memory_format (torch.memory_format): the desired memory
format for 4D parameters and buffers in this module (keyword only argument)
Returns:
Module: self
Example:

linear = nn.Linear(2, 2)
linear.weight
Parameter containing:
tensor([[ 0.1913, -0.3420],
[-0.5113, -0.2325]])

linear.to(torch.double)
Linear(in_features=2, out_features=2, bias=True)

linear.weight
Parameter containing:
tensor([[ 0.1913, -0.3420],
[-0.5113, -0.2325]], dtype=torch.float64)

gpu1 = torch.device(“cuda:1”)
linear.to(gpu1, dtype=torch.half, non_blocking=True)
Linear(in_features=2, out_features=2, bias=True)

linear.weight
Parameter containing:
tensor([[ 0.1914, -0.3420],
[-0.5112, -0.2324]], dtype=torch.float16, device=‘cuda:1’)

cpu = torch.device(“cpu”)
linear.to(cpu)
Linear(in_features=2, out_features=2, bias=True)

linear.weight
Parameter containing:
tensor([[ 0.1914, -0.3420],
[-0.5112, -0.2324]], dtype=torch.float16)
type(dst_type: Union[torch.dtype, str]) → T
Casts all parameters and buffers to dst_type.
Arguments:
dst_type (type or string): the desired type
Returns:
Module: self

MinkowskiPooling池化(下)相关推荐

  1. MinkowskiPooling池化(上)

    MinkowskiPooling池化(上) 如果内核大小等于跨步大小(例如kernel_size = [2,1],跨步= [2,1]),则引擎将更快地生成与池化函数相对应的输入输出映射. 如果使用U网 ...

  2. 卷积下采样和池化的区别

    池化 通常池化层紧跟在 CNN 的卷积层之后. 池化方法: max-pooling:对邻域内特征点取最大值 mean-pooling:对邻域内特征点求平均 池化的作用: 降维,减少网络要学习的参数数量 ...

  3. pytorch —— 池化、线性、激活函数层

    1.池化层--Pooling Layer 池化运算:对信号进行"收集"并"总结",类似水池收集水资源,因为得名池化层. 收集:多变少: 总结:最大值/平均值 1 ...

  4. Week3:[任务三] nn网络层-池化、线性、激活函数网络层

    [目录] 池化层--Pooling Layer 线性层--Linear Layer 激活函数层--Activation Layer 1.池化层 据观察可得,池化后的图片与池化前相比较,细节信息并没有丢 ...

  5. 卷积神经网络 池化层上采样(upsampling、interpolating)、下采样(subsampled、downsampled)是什么?(上采样为放大图像或图像插值、下采样为缩小图像)

    缩小图像:或称为下采样(subsampled)或降采样(downsampled) 主要目的有两个:1.使得图像符合显示区域的大小:2.生成对应图像的缩略图. 放大图像:或称为上采样(upsamplin ...

  6. 【小白学PyTorch】扩展之Tensorflow2.0 | 21 Keras的API详解(下)池化、Normalization

    <<小白学PyTorch>> 扩展之Tensorflow2.0 | 21 Keras的API详解(上)卷积.激活.初始化.正则 扩展之Tensorflow2.0 | 20 TF ...

  7. tensorflow环境下的识别食物_在TensorFlow+Keras环境下使用RoI池化一步步实现注意力机制...

    在本文中,作者解释了感兴趣区域池化(RoI 池化)的基本概念和一般用法,以及如何使用它来实现注意力机制.他一步步给出了在 Keras 和 TensorFlow 环境下使用 RoI 池化的实现. 选自 ...

  8. 通道注意力机制keras_在TensorFlow+Keras环境下使用RoI池化一步步实现注意力机制

    项目地址:https://gist.github.com/Jsevillamol/0daac5a6001843942f91f2a3daea27a7 理解 RoI 池化 RoI 池化的概念由 Ross ...

  9. 卷积向下取整 池化向上取整

    卷积向下取整 池化向上取整 在我计算GoogLeNet的每一步的图片的尺寸的时候 我运用卷积的计算公式对对我们的图片的尺寸进行计算,却发现是不行的,我就很疑惑 我用的是一下公式 (1)输入数据体的尺寸 ...

最新文章

  1. 动态规划——乘积为正数的最长子数组长度(Leetcode 1567)
  2. 使用栈将递归函数转化为非递归函数_栈(Stack)及其应用-Python实现
  3. C++ 中的友元(friend)
  4. 50.Linux/Unix 系统编程手册(下) -- 虚拟内存操作
  5. 网络编程 - 实现文件传送
  6. 图数据库JanusGraph入门(一)JanusGraph初识
  7. 数理统计复习笔记四——区间估计
  8. 邓亚萍加盟人民日报社 担任人民搜索一把手
  9. 2012服务器系统有什么版本的,Windows server 2012操作系统有哪几个版本
  10. 大数据招聘信息可视化
  11. 多种消息提醒系统的设计模式、实现方案(附功能截图+表结构)
  12. A19-Python基础之lambda匿名函数-过滤器-映射
  13. k210安装ch210驱动(看着一篇就足够了)
  14. 含泪整理最优质美食壁纸素材,你想要的这里都有
  15. 新版标准日本语初级_第三十七课
  16. 上海工程技术大学c语言试卷,上海工程技术大学2009_2010C语言试卷A.doc
  17. 【Java -- Map】
  18. 运维思索:cmdb与zabbix监控系统的融合
  19. 大学四年要做的四件事
  20. 1 Robotics: Aerial Robotics 第3+4周 课程学习记录及课后习题解答

热门文章

  1. 伦理困境:人工智能浪潮与“AI威胁论”之争
  2. etcd 笔记(08)— 基于 etcd 实现分布式锁
  3. Python+OpenCV 图像处理系列(9)—— 图像的翻转和缩放插值
  4. Apache Maven 安装与配置-修改源
  5. 【牛腩新闻发布系统】开发前的准备01
  6. bert推理速度太慢如何解决
  7. Python __dict__属性详解
  8. [实现] 利用 Seq2Seq 预测句子后续字词 (Pytorch)2
  9. synopsys PCIE IP协议解析
  10. 定制语音代理(智能体)的背后是什么?