Fix slice for out of bound start and end attributes
1 unresolved thread
1 unresolved thread
- Fix #221 (closed)
- Add getInputs and getOutputs method to OperatorTensor (very minor change I didn't wanted to create another MR just for it)
Merge request reports
Activity
Filter activity
assigned to @cmoineau
requested review from @hrouis
requested review from @pineapple
253 253 const DimIdx_t axis = this->axes()[i] >= 0 ? 254 254 static_cast<DimIdx_t>(this->axes()[i]) : 255 255 static_cast<DimIdx_t>(this->axes()[i] + static_cast<DimIdx_t>(getInput(0)->nbDims())); 256 const DimSize_t start = this->starts()[i] >= 0 ? 256 DimSize_t start = this->starts()[i] >= 0 ? 257 257 static_cast<DimSize_t>(this->starts()[i]) : 258 258 static_cast<DimSize_t>(this->starts()[i] + static_cast<DimSize_t>(getInput(0)->dims()[axis])); 259 const DimSize_t end = this->ends()[i] >= 0 ? 259 // Clamp start to the range [0, axis_dim] 260 start = std::max(static_cast<DimSize_t>(0), std::min(start, getInput(0)->dims()[axis]-1)); 261 262 DimSize_t end = this->ends()[i] >= 0 ? 260 263 static_cast<DimSize_t>(this->ends()[i]) : 261 264 static_cast<DimSize_t>(this->ends()[i] + static_cast<DimSize_t>(getInput(0)->dims()[axis])); 265 // Clamp end to the range [0, axis_dim] 266 end = std::max(static_cast<DimSize_t>(0), std::min(end, getInput(0)->dims()[axis]-1)); changed this line in version 2 of the diff
- Resolved by Houssem ROUIS
mentioned in commit 3d9f7779
added 1 commit
- 698594a6 - Add getInputs and getOuputs method for OperatorTensor.
- Resolved by Cyril Moineau
mentioned in commit 9dd41e85
Please register or sign in to reply