| 30 | } |
| 31 | |
| 32 | void IWeightsManager::manage(const ITensor *weights, ITransformWeights *parent) |
| 33 | { |
| 34 | if (!are_weights_managed(weights)) |
| 35 | { |
| 36 | _managed_weights[weights]; |
| 37 | _managed_counter[weights]; |
| 38 | } |
| 39 | else |
| 40 | { |
| 41 | _managed_counter[weights].counter++; |
| 42 | } |
| 43 | |
| 44 | // In case the weights are an output of a previous reshape function |
| 45 | // store the parent's link |
| 46 | if (parent != nullptr) |
| 47 | { |
| 48 | if (_managed_weights_parents.find(weights) == _managed_weights_parents.end()) |
| 49 | { |
| 50 | _managed_weights_parents[weights] = parent; |
| 51 | } |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | ITensor *IWeightsManager::run(const ITensor *weights, ITransformWeights *weights_transform) |
| 56 | { |
no test coverage detected