MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / FillWithMinorDimNum

Method FillWithMinorDimNum

tensorflow/compiler/xla/array4d.h:157–172  ·  view source on GitHub ↗

Fills each of the minor-dim matrices with a number designating which minor dim matrix is enclosed by the shape.

Source from the content-addressed store, hash-verified

155 // Fills each of the minor-dim matrices with a number designating which minor
156 // dim matrix is enclosed by the shape.
157 void FillWithMinorDimNum() {
158 LOG(INFO) << "width: " << this->width();
159 LOG(INFO) << "height: " << this->height();
160 LOG(INFO) << "depth: " << this->depth();
161 LOG(INFO) << "planes: " << this->planes();
162 for (int64 height = 0; height < this->height(); ++height) {
163 for (int64 width = 0; width < this->width(); ++width) {
164 for (int64 plane = 0; plane < planes(); ++plane) {
165 for (int64 depth = 0; depth < this->depth(); ++depth) {
166 float this_val = plane * this->depth() + depth;
167 (*this)(plane, depth, height, width) = this_val;
168 }
169 }
170 }
171 }
172 }
173};
174
175} // namespace xla

Callers 1

XLA_TEST_PFunction · 0.80

Calls 4

widthMethod · 0.95
heightMethod · 0.95
depthMethod · 0.95
planesMethod · 0.95

Tested by 1

XLA_TEST_PFunction · 0.64