| 289 | |
| 290 | template <typename T> |
| 291 | void PopulateTensor(int index, const std::vector<T>& data) { |
| 292 | // Nothing to do if tensor is an optional input or if data vector is empty. |
| 293 | if ((index == kOptionalTensor) || data.empty()) return; |
| 294 | SingleOpModel::PopulateTensor(index, data); |
| 295 | } |
| 296 | |
| 297 | void SetWeights(int index, const std::vector<float>& data) { |
| 298 | if (data.empty()) return; |