MCPcopy Create free account
hub / github.com/NVIDIA/FasterTransformer / getVal

Method getVal

src/fastertransformer/utils/Tensor.h:411–418  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

409
410 template<typename T>
411 inline T getVal(const std::string& key) const
412 {
413 FT_CHECK_WITH_INFO(isExist(key),
414 fmtstr("Cannot find a tensor of name %s in the tensor map (keys: %s)",
415 key.c_str(),
416 vec2str(keys()).c_str()));
417 return tensor_map_.at(key).getVal<T>();
418 }
419
420 template<typename T>
421 inline T getVal(const std::string& key, T default_value) const

Callers

nothing calls this directly

Calls 3

fmtstrFunction · 0.85
vec2strFunction · 0.85
atMethod · 0.80

Tested by

no test coverage detected