| 346 | } |
| 347 | |
| 348 | TensorMap::TensorMap(const std::unordered_map<std::string, Tensor>& tensor_map) |
| 349 | { |
| 350 | for (auto& kv : tensor_map) { |
| 351 | if (isValid(kv.second)) { |
| 352 | insert(kv.first, kv.second); |
| 353 | } |
| 354 | else { |
| 355 | FT_LOG_DEBUG(fmtstr("%s is not a valid tensor, skipping insert into TensorMap", kv.first.c_str())); |
| 356 | } |
| 357 | } |
| 358 | } |
| 359 | |
| 360 | TensorMap::TensorMap(const std::vector<Tensor>& tensor_map) |
| 361 | { |