libtorch c++ 调用(二)模块查看

94 篇文章 12 订阅

我所用的是libtorch1.5.1,新建了一个vs工程,查看了一下torch中支持的模块。

查找全部 "TORCH_MODULE", 子文件夹, 查找结果 1, "整个解决方案 (包括外部项目)", ""
\csrc\api\include\torch\nn\modules\activation.h(47):TORCH_MODULE(ELU);
\csrc\api\include\torch\nn\modules\activation.h(82):TORCH_MODULE(SELU);
\csrc\api\include\torch\nn\modules\activation.h(117):TORCH_MODULE(Hardshrink);
\csrc\api\include\torch\nn\modules\activation.h(152):TORCH_MODULE(Hardtanh);
\csrc\api\include\torch\nn\modules\activation.h(187):TORCH_MODULE(LeakyReLU);
\csrc\api\include\torch\nn\modules\activation.h(208):TORCH_MODULE(LogSigmoid);
\csrc\api\include\torch\nn\modules\activation.h(243):TORCH_MODULE(Softmax);
\csrc\api\include\torch\nn\modules\activation.h(278):TORCH_MODULE(Softmin);
\csrc\api\include\torch\nn\modules\activation.h(313):TORCH_MODULE(LogSoftmax);
\csrc\api\include\torch\nn\modules\activation.h(334):TORCH_MODULE(Softmax2d);
\csrc\api\include\torch\nn\modules\activation.h(372):TORCH_MODULE(PReLU);
\csrc\api\include\torch\nn\modules\activation.h(407):TORCH_MODULE(ReLU);
\csrc\api\include\torch\nn\modules\activation.h(442):TORCH_MODULE(ReLU6);
\csrc\api\include\torch\nn\modules\activation.h(477):TORCH_MODULE(RReLU);
\csrc\api\include\torch\nn\modules\activation.h(512):TORCH_MODULE(CELU);
\csrc\api\include\torch\nn\modules\activation.h(547):TORCH_MODULE(GLU);
\csrc\api\include\torch\nn\modules\activation.h(568):TORCH_MODULE(GELU);
\csrc\api\include\torch\nn\modules\activation.h(589):TORCH_MODULE(Sigmoid);
\csrc\api\include\torch\nn\modules\activation.h(624):TORCH_MODULE(Softplus);
\csrc\api\include\torch\nn\modules\activation.h(659):TORCH_MODULE(Softshrink);
\csrc\api\include\torch\nn\modules\activation.h(680):TORCH_MODULE(Softsign);
\csrc\api\include\torch\nn\modules\activation.h(701):TORCH_MODULE(Tanh);
\csrc\api\include\torch\nn\modules\activation.h(722):TORCH_MODULE(Tanhshrink);
\csrc\api\include\torch\nn\modules\activation.h(759):TORCH_MODULE(Threshold);
\csrc\api\include\torch\nn\modules\activation.h(812):TORCH_MODULE(MultiheadAttention);
\csrc\api\include\torch\nn\modules\adaptive.h(91):TORCH_MODULE(AdaptiveLogSoftmaxWithLoss);
\csrc\api\include\torch\nn\modules\batchnorm.h(153):TORCH_MODULE(BatchNorm1d);
\csrc\api\include\torch\nn\modules\batchnorm.h(181):TORCH_MODULE(BatchNorm2d);
\csrc\api\include\torch\nn\modules\batchnorm.h(209):TORCH_MODULE(BatchNorm3d);
\csrc\api\include\torch\nn\modules\common.h(19):/// TORCH_MODULE(M);
\csrc\api\include\torch\nn\modules\common.h(63):/// TORCH_MODULE(M);
\csrc\api\include\torch\nn\modules\conv.h(147):TORCH_MODULE(Conv1d);
\csrc\api\include\torch\nn\modules\conv.h(182):TORCH_MODULE(Conv2d);
\csrc\api\include\torch\nn\modules\conv.h(214):TORCH_MODULE(Conv3d);
\csrc\api\include\torch\nn\modules\conv.h(292):TORCH_MODULE(ConvTranspose1d);
\csrc\api\include\torch\nn\modules\conv.h(327):TORCH_MODULE(ConvTranspose2d);
\csrc\api\include\torch\nn\modules\conv.h(362):TORCH_MODULE(ConvTranspose3d);
\csrc\api\include\torch\nn\modules\distance.h(46):TORCH_MODULE(CosineSimilarity);
\csrc\api\include\torch\nn\modules\distance.h(82):TORCH_MODULE(PairwiseDistance);
\csrc\api\include\torch\nn\modules\dropout.h(69):TORCH_MODULE(Dropout);
\csrc\api\include\torch\nn\modules\dropout.h(99):TORCH_MODULE(Dropout2d);
\csrc\api\include\torch\nn\modules\dropout.h(129):TORCH_MODULE(Dropout3d);
\csrc\api\include\torch\nn\modules\dropout.h(160):TORCH_MODULE(AlphaDropout);
\csrc\api\include\torch\nn\modules\dropout.h(187):TORCH_MODULE(FeatureAlphaDropout);
\csrc\api\include\torch\nn\modules\fold.h(46):TORCH_MODULE(Fold);
\csrc\api\include\torch\nn\modules\fold.h(83):TORCH_MODULE(Unfold);
\csrc\api\include\torch\nn\modules\container\functional.h(101):TORCH_MODULE(Functional);
\csrc\api\include\torch\nn\modules\instancenorm.h(52):TORCH_MODULE(InstanceNorm1d);
\csrc\api\include\torch\nn\modules\instancenorm.h(80):TORCH_MODULE(InstanceNorm2d);
\csrc\api\include\torch\nn\modules\instancenorm.h(108):TORCH_MODULE(InstanceNorm3d);
\csrc\api\include\torch\nn\modules\linear.h(35):TORCH_MODULE(Identity);
\csrc\api\include\torch\nn\modules\linear.h(83):TORCH_MODULE(Linear);
\csrc\api\include\torch\nn\modules\linear.h(119):TORCH_MODULE(Flatten);
\csrc\api\include\torch\nn\modules\linear.h(167):TORCH_MODULE(Bilinear);
\csrc\api\include\torch\nn\modules\loss.h(51):TORCH_MODULE(L1Loss);
\csrc\api\include\torch\nn\modules\loss.h(85):TORCH_MODULE(KLDivLoss);
\csrc\api\include\torch\nn\modules\loss.h(120):TORCH_MODULE(MSELoss);
\csrc\api\include\torch\nn\modules\loss.h(155):TORCH_MODULE(BCELoss);
\csrc\api\include\torch\nn\modules\loss.h(191):TORCH_MODULE(HingeEmbeddingLoss);
\csrc\api\include\torch\nn\modules\loss.h(229):TORCH_MODULE(MultiMarginLoss);
\csrc\api\include\torch\nn\modules\loss.h(271):TORCH_MODULE(CosineEmbeddingLoss);
\csrc\api\include\torch\nn\modules\loss.h(309):TORCH_MODULE(SmoothL1Loss);
\csrc\api\include\torch\nn\modules\loss.h(346):TORCH_MODULE(MultiLabelMarginLoss);
\csrc\api\include\torch\nn\modules\loss.h(382):TORCH_MODULE(SoftMarginLoss);
\csrc\api\include\torch\nn\modules\loss.h(419):TORCH_MODULE(MultiLabelSoftMarginLoss);
\csrc\api\include\torch\nn\modules\loss.h(462):TORCH_MODULE(TripletMarginLoss);
\csrc\api\include\torch\nn\modules\loss.h(498):TORCH_MODULE(CTCLoss);
\csrc\api\include\torch\nn\modules\loss.h(532):TORCH_MODULE(PoissonNLLLoss);
\csrc\api\include\torch\nn\modules\loss.h(569):TORCH_MODULE(MarginRankingLoss);
\csrc\api\include\torch\nn\modules\loss.h(610):TORCH_MODULE(NLLLoss);
\csrc\api\include\torch\nn\modules\loss.h(651):TORCH_MODULE(CrossEntropyLoss);
\csrc\api\include\torch\nn\modules\loss.h(694):TORCH_MODULE(BCEWithLogitsLoss);
\csrc\api\include\torch\nn\modules\container\modulelist.h(253):TORCH_MODULE(ModuleList);
\csrc\api\include\torch\nn\modules\normalization.h(70):TORCH_MODULE(LayerNorm);
\csrc\api\include\torch\nn\modules\normalization.h(109):TORCH_MODULE(LocalResponseNorm);
\csrc\api\include\torch\nn\modules\normalization.h(142):TORCH_MODULE(CrossMapLRN2d);
\csrc\api\include\torch\nn\modules\normalization.h(188):TORCH_MODULE(GroupNorm);
\csrc\api\include\torch\nn\modules\padding.h(54):TORCH_MODULE(ReflectionPad1d);
\csrc\api\include\torch\nn\modules\padding.h(79):TORCH_MODULE(ReflectionPad2d);
\csrc\api\include\torch\nn\modules\padding.h(125):TORCH_MODULE(ReplicationPad1d);
\csrc\api\include\torch\nn\modules\padding.h(150):TORCH_MODULE(ReplicationPad2d);
\csrc\api\include\torch\nn\modules\padding.h(175):TORCH_MODULE(ReplicationPad3d);
\csrc\api\include\torch\nn\modules\padding.h(212):TORCH_MODULE(ZeroPad2d);
\csrc\api\include\torch\nn\modules\padding.h(258):TORCH_MODULE(ConstantPad1d);
\csrc\api\include\torch\nn\modules\padding.h(283):TORCH_MODULE(ConstantPad2d);
\csrc\api\include\torch\nn\modules\padding.h(308):TORCH_MODULE(ConstantPad3d);
\csrc\api\include\torch\nn\pimpl.h(195):#define TORCH_MODULE_IMPL(Name, Impl)                              \
\csrc\api\include\torch\nn\pimpl.h(201):/// Like `TORCH_MODULE_IMPL`, but defaults the `Impl` name to `<Name>Impl`.
\csrc\api\include\torch\nn\pimpl.h(202):#define TORCH_MODULE(Name) TORCH_MODULE_IMPL(Name, Name##Impl)
\csrc\api\include\torch\nn\modules\pixelshuffle.h(45):TORCH_MODULE(PixelShuffle);
\csrc\api\include\torch\nn\modules\pooling.h(55):TORCH_MODULE(AvgPool1d);
\csrc\api\include\torch\nn\modules\pooling.h(81):TORCH_MODULE(AvgPool2d);
\csrc\api\include\torch\nn\modules\pooling.h(107):TORCH_MODULE(AvgPool3d);
\csrc\api\include\torch\nn\modules\pooling.h(156):TORCH_MODULE(MaxPool1d);
\csrc\api\include\torch\nn\modules\pooling.h(186):TORCH_MODULE(MaxPool2d);
\csrc\api\include\torch\nn\modules\pooling.h(216):TORCH_MODULE(MaxPool3d);
\csrc\api\include\torch\nn\modules\pooling.h(271):TORCH_MODULE(AdaptiveMaxPool1d);
\csrc\api\include\torch\nn\modules\pooling.h(303):TORCH_MODULE(AdaptiveMaxPool2d);
\csrc\api\include\torch\nn\modules\pooling.h(335):TORCH_MODULE(AdaptiveMaxPool3d);
\csrc\api\include\torch\nn\modules\pooling.h(386):TORCH_MODULE(AdaptiveAvgPool1d);
\csrc\api\include\torch\nn\modules\pooling.h(414):TORCH_MODULE(AdaptiveAvgPool2d);
\csrc\api\include\torch\nn\modules\pooling.h(442):TORCH_MODULE(AdaptiveAvgPool3d);
\csrc\api\include\torch\nn\modules\pooling.h(490):TORCH_MODULE(MaxUnpool1d);
\csrc\api\include\torch\nn\modules\pooling.h(519):TORCH_MODULE(MaxUnpool2d);
\csrc\api\include\torch\nn\modules\pooling.h(548):TORCH_MODULE(MaxUnpool3d);
\csrc\api\include\torch\nn\modules\pooling.h(591):TORCH_MODULE(FractionalMaxPool2d);
\csrc\api\include\torch\nn\modules\pooling.h(634):TORCH_MODULE(FractionalMaxPool3d);
\csrc\api\include\torch\nn\modules\pooling.h(680):TORCH_MODULE(LPPool1d);
\csrc\api\include\torch\nn\modules\pooling.h(708):TORCH_MODULE(LPPool2d);
\csrc\api\include\torch\nn\modules\rnn.h(128):TORCH_MODULE(RNN);
\csrc\api\include\torch\nn\modules\rnn.h(178):TORCH_MODULE(LSTM);
\csrc\api\include\torch\nn\modules\rnn.h(222):TORCH_MODULE(GRU);
\csrc\api\include\torch\nn\modules\rnn.h(291):TORCH_MODULE(RNNCell);
\csrc\api\include\torch\nn\modules\rnn.h(325):TORCH_MODULE(LSTMCell);
\csrc\api\include\torch\nn\modules\rnn.h(359):TORCH_MODULE(GRUCell);
\csrc\api\include\torch\nn\modules\upsampling.h(51):TORCH_MODULE(Upsample);
 匹配行: 116  匹配文件数: 20  已搜索文件总数: 553

 

 

 

 

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

落花逐流水

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值