| 105 | } |
| 106 | |
| 107 | bool HasBuffer(const ModelT* model, const SubGraphT* subgraph, |
| 108 | int tensor_index) { |
| 109 | const int buffer_index = subgraph->tensors[tensor_index]->buffer; |
| 110 | BufferT* buffer = model->buffers[buffer_index].get(); |
| 111 | if (buffer == nullptr || buffer->data.empty()) { |
| 112 | return false; |
| 113 | } |
| 114 | return true; |
| 115 | } |
| 116 | |
| 117 | bool HasMinMax(const TensorT* tensor) { |
| 118 | return tensor->quantization && !tensor->quantization->min.empty() && |