MCPcopy Create free account
hub / github.com/AllentDan/LibtorchTutorials / forward

Method forward

lesson3-BasicModels/BaseModule.cpp:9–13  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7}
8
9torch::Tensor ConvReluBnImpl::forward(torch::Tensor x) {
10 x = torch::relu(conv->forward(x));
11 x = bn(x);
12 return x;
13}
14
15LinearBnReluImpl::LinearBnReluImpl(int in_features, int out_features){
16 ln = register_module("ln", torch::nn::Linear(torch::nn::LinearOptions(in_features, out_features)));

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected