MCPcopy Create free account
hub / github.com/Tencent/TurboTransformers / LoadPooler

Function LoadPooler

example/cpp/bert_model.cpp:43–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43static std::unique_ptr<layers::BertPooler> LoadPooler(NPZMapView npz,
44 DLDeviceType dev) {
45 NPZLoader params(std::move(npz), dev);
46
47 return std::unique_ptr<layers::BertPooler>(
48 new layers::BertPooler(params["dense.weight"], params["dense.bias"]));
49}
50
51struct BERTLayer {
52 explicit BERTLayer(NPZLoader params, int64_t n_heads) {

Callers 1

ImplMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected