Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
38
torch::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
Train
Method · 0.45
Predict
Method · 0.45
main
Function · 0.45
Calls
1
flatten
Function · 0.85
Tested by
no test coverage detected