| 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 |