MCPcopy Create free account
hub / github.com/Tencent/TurboTransformers / operator()

Method operator()

example/cpp/bert_model.cpp:68–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66 }
67
68 void operator()(core::Tensor &hidden, core::Tensor &mask,
69 core::Tensor *attention_out, core::Tensor *intermediate_out,
70 core::Tensor *output) {
71 (*attention_)(hidden, mask, attention_out);
72 (*intermediate_)(*attention_out, intermediate_out);
73 (*output_)(*intermediate_out, *attention_out, output);
74 }
75
76 std::unique_ptr<layers::BertAttention> attention_;
77 std::unique_ptr<layers::BertIntermediate> intermediate_;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected