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

Method forward

lesson5-TrainingVGG/vgg.cpp:38–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38torch::Tensor VGGImpl::forward(torch::Tensor x){
39 x = features_->forward(x);
40 x = avgpool(x);
41 x = torch::flatten(x,1);
42 x = classifier->forward(x);
43 return torch::log_softmax(x, 1);
44}

Callers 3

TrainMethod · 0.45
PredictMethod · 0.45
mainFunction · 0.45

Calls 1

flattenFunction · 0.85

Tested by

no test coverage detected