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

Method Output

tensorflow/compiler/tf2xla/kernels/bcast_ops.cc:112–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110
111 private:
112 void Output(XlaOpKernelContext* ctx, int idx, const BCast::Vec& v) {
113 const int64 len = v.size();
114 Tensor constant(DT_INT32, TensorShape({len}));
115 for (int64 i = 0; i < len; ++i) {
116 constant.flat<int32>()(i) = static_cast<int32>(v[i]);
117 }
118 ctx->SetConstantOutput(idx, constant);
119 }
120
121 TF_DISALLOW_COPY_AND_ASSIGN(BCastGradArgsOp);
122};

Calls 3

SetConstantOutputMethod · 0.80
TensorShapeClass · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected