| 14428 | } |
| 14429 | |
| 14430 | bool sam3_dump_model_tensor(const sam3_model & model, |
| 14431 | const std::string & tensor_name, |
| 14432 | const std::string & output_path) { |
| 14433 | auto it = model.tensors.find(tensor_name); |
| 14434 | if (it == model.tensors.end() || !it->second) { |
| 14435 | fprintf(stderr, "%s: tensor '%s' not found in model\n", __func__, tensor_name.c_str()); |
| 14436 | return false; |
| 14437 | } |
| 14438 | return sam3_dump_tensor_to_path(it->second, tensor_name, output_path); |
| 14439 | } |