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

Method forward

lesson6-Segmentation/UNet.cpp:21–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19}
20
21torch::Tensor UNetImpl::forward(torch::Tensor x){
22 std::vector<torch::Tensor> features = encoder->features(x);
23 x = decoder->forward(features);
24 x = segmentation_head->forward(x);
25 return x;
26}

Callers 2

TrainMethod · 0.45
PredictMethod · 0.45

Calls 1

featuresMethod · 0.80

Tested by

no test coverage detected