static */
| 1098 | } |
| 1099 | |
| 1100 | /* static */ Status GraphTransferer::MakeTensorFromProto( |
| 1101 | const TensorProto& tensor_proto, Tensor* tensor) { |
| 1102 | if (tensor_proto.dtype() > 0 && tensor_proto.dtype() <= DataType_MAX) { |
| 1103 | Tensor parsed(tensor_proto.dtype()); |
| 1104 | if (parsed.FromProto(cpu_allocator(), tensor_proto)) { |
| 1105 | *tensor = parsed; |
| 1106 | return Status::OK(); |
| 1107 | } |
| 1108 | } |
| 1109 | return errors::InvalidArgument("Cannot parse tensor from proto: ", |
| 1110 | tensor_proto.DebugString()); |
| 1111 | } |
| 1112 | |
| 1113 | void GraphTransferer::ClearCache() { |
| 1114 | node_name_cache_list_.clear(); |
no test coverage detected