MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / ShiftNegativeAxisVec

Method ShiftNegativeAxisVec

oneflow/core/common/shape.cpp:171–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169}
170
171AxisVector Shape::ShiftNegativeAxisVec(const AxisVector& axis_vec) const {
172 const int64_t num_axes = this->NumAxes();
173 AxisVector ret = axis_vec;
174 for (int64_t i = 0; i < axis_vec.size(); i++) {
175 ret.at(i) = ShiftNegativeAxis(axis_vec.at(i), num_axes);
176 }
177 return ret;
178}
179
180Shape Shape::RemoveOnes(const AxisVector& axis_vec) const {
181 DimVector dim_vec;

Callers

nothing calls this directly

Calls 4

NumAxesMethod · 0.95
ShiftNegativeAxisFunction · 0.85
sizeMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected