MinkowskiPooling池化(下)

MinkowskiPoolingTranspose

class MinkowskiEngine.MinkowskiPoolingTranspose(kernel_sizestridedilation=1kernel_generator=Nonedimension=None)

稀疏张量的池转置层。

展开功能,然后将其除以贡献的非零元素的数量。

__init__(kernel_sizestridedilation=1kernel_generator=Nonedimension=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.SparseTensorcoords: Union[torch.IntTensor, MinkowskiCoords.CoordsKeySparseTensor.SparseTensor] = None)

input (MinkowskiEngine.SparseTensor): Input sparse tensor to apply a convolution on.
coords ((torch.IntTensorMinkowskiEngine.CoordsKeyMinkowskiEngine.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=Nonedtype=Nonenon_blocking=False)
to(dtypenon_blocking=False)
to(tensornon_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=Truemode=<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=Nonedtype=Nonenon_blocking=False)
to(dtypenon_blocking=False)
to(tensornon_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. 卷积和池化的区别、图像的上采样(upsampling)与下采样(subsampled)

    1.卷积 当从一个大尺寸图像中随机选取一小块,比如说 8x8 作为样本,并且从这个小块样本中学习到了一些特征,这时我们可以把从这个 8x8 样本中学习到的特征作为探测器,应用到这个图像的任意地方中去. ...

  3. 【小白学PyTorch】21 Keras的API详解(下)池化、Normalization层

    文章来自微信公众号:[机器学习炼丹术].作者WX:cyx645016617. 参考目录: 目录 1 池化层 1.1 最大池化层 1.2 平均池化层 1.3 全局最大池化层 1.4 全局平均池化层 2 ...

  4. 测试EntityFramework,Z.EntityFramework.Extensions,原生语句在不同的查询中的表现。原来池化与非池化设定是有巨大的影响的。

    Insert测试,只测试1000条的情况,多了在实际的项目中应该就要另行处理了. using System; using System.Collections.Generic; using Syste ...

  5. 由浅入深了解Thrift之客户端连接池化

    一.问题描述 在上一篇<由浅入深了解Thrift之服务模型和序列化机制>文章中,我们已经了解了thrift的基本架构和网络服务模型的优缺点.如今的互联网圈中,RPC服务化的思想如火如荼.我 ...

  6. Deep Learning 学习随记(七)Convolution and Pooling --卷积和池化

    图像大小与参数个数: 前面几章都是针对小图像块处理的,这一章则是针对大图像进行处理的.两者在这的区别还是很明显的,小图像(如8*8,MINIST的28*28)可以采用全连接的方式(即输入层和隐含层直接 ...

  7. 池化 - Apache Commons Pool

    对于那些创建耗时较长,或者资源占用较多的对象,比如网络连接,线程之类的资源,通常使用池化来管理这些对象,从而达到提高性能的目的.比如数据库连接池(c3p0, dbcp), java的线程池 Execu ...

  8. 对象池化技术 org.apache.commons.pool

    恰当地使用对象池化技术,可以有效地减少对象生成和初始化时的消耗,提高系统的运行效率.Jakarta Commons Pool组件提供了一整套用于实现对象池化的框架,以及若干种各具特色的对象池实现,可以 ...

  9. 高可用的池化 Thrift Client 实现(源码分享)

    本文将分享一个高可用的池化 Thrift Client 及其源码实现,欢迎阅读源码(Github)并使用,同时欢迎提出宝贵的意见和建议,本人将持续完善. 本文的主要目标读者是对 Thrift 有一定了 ...

随机推荐

  1. hdu1960 最小路径覆盖

    题意:       给你明天的出租车订单,订单中包含每个人的起点和终点坐标,还有时间,如果一辆出租车想接一个乘客必须在每个订单前1分钟到达,也就是小于等于time-1,问你完成所有订单要最少多少量出租 ...

  2. IPC$共享和其他共享(C$、D$)

    目录 net use共享命令的用法 IPC$ IPC空连接 ipc$使用的端口 关闭IPC$共享 net use共享命令的用法 net use #查看连接 net share              ...

  3. upload

    File saveDir=new File("D:/Test/UPLOAD"); if(!saveDir.isDirectory()){ saveDir.mkdirs(); } F ...

  4. Cannot load driver class: com.mysql.jdbc.Driver

    mysql-connector-java提供了mysql驱动等类库,此处必须引入此依赖,否则将会提示: Cannot load driver class: com.mysql.jdbc.Driver等 ...

  5. 分布式ID

    需求 全局唯一 高性能 高可用 简单易用 UUID 优点: 唯一 不依赖于任何第三方服务 缺点: 是字符串类型而非数字,不满足数字ID的需求 字符串太长了,DB查询效率受影响 数据库自增ID 如果使用 ...

  6. C#中的partial关键字

    这节讲一下partial(局部的,部分的)关键字,初学者可能没有接触过这个关键字,但是只要你写过winform或者WPF应用程序的话,那你肯定被动用过这个关键字.首先介绍一下这个关键字的作用,它用作定 ...

  7. 手把手教你部署验证freeswitch(避免踩坑)

    前言:请各大网友尊重本人原创知识分享,谨记本人博客:南国以南i 介绍:freeswitch可集成ASR(语音识别)和TTS(文本转语音)创建智能电话机器人和用户通话,可用于问卷调查,自动催缴等业务,电 ...

  8. SE_WorkX_提问回顾与个人总结

    项目 内容 课程:北航-2020-春-软件工程 博客园班级博客 要求:正所谓"实践是认识的来源.目的.动力以及检验认识真理性的唯一标准",在经历了一个学期的学习和实践后,请大家写一 ...

  9. OCR-Form-Tools项目试玩记录(一)本地部署

    OCR-Form-Tools是微软的一个开源代码库,包含微软表单识别和OCR服务相关的多种工具.Github仓库地址 目前,表单标注工具(OCR Form Labeling Tool)是首个发布到本该 ...

  10. OO_Unit1_表达式求导

    CSDN链接 一.第一次作业 1.需求分析 简单多项式导函数 带符号整数 支持前导0的带符号整数,符号可省略,如: +02.-16.19260817等. 幂函数 一般形式 由自变量x和指数组成,指数为 ...