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

Class plainCNN

lesson3-BasicModels/CNN.h:7–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5#include"BaseModule.h"
6
7class plainCNN : public torch::nn::Module{
8public:
9 plainCNN(int in_channels, int out_channels);
10 torch::Tensor forward(torch::Tensor x);
11private:
12 int mid_channels[3] = {32,64,128};
13 ConvReluBn conv1{nullptr};
14 ConvReluBn down1{nullptr};
15 ConvReluBn conv2{nullptr};
16 ConvReluBn down2{nullptr};
17 ConvReluBn conv3{nullptr};
18 ConvReluBn down3{nullptr};
19 torch::nn::Conv2d out_conv{nullptr};
20};

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected