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

Method TensorArrayOp

tensorflow/core/kernels/tensor_array_ops.cc:161–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

159class TensorArrayOp : public TensorArrayCreationOp {
160 public:
161 explicit TensorArrayOp(OpKernelConstruction* context)
162 : TensorArrayCreationOp(context) {
163 OP_REQUIRES_OK(context, context->GetAttr("dtype", &dtype_));
164 OP_REQUIRES_OK(context, context->GetAttr("element_shape", &element_shape_));
165 OP_REQUIRES_OK(context, context->GetAttr("dynamic_size", &dynamic_size_));
166 // The HasAttr check is for backwards compatibility with older op
167 // versions which do not have this attribute.
168 if (context->HasAttr("identical_element_shapes")) {
169 OP_REQUIRES_OK(context, context->GetAttr("identical_element_shapes",
170 &identical_element_shapes_));
171 } else {
172 identical_element_shapes_ = false;
173 }
174 OP_REQUIRES_OK(context,
175 context->GetAttr("clear_after_read", &clear_after_read_));
176 OP_REQUIRES_OK(context,
177 context->GetAttr("tensor_array_name", &tensor_array_name_));
178 if (tensor_array_name_.empty()) tensor_array_name_ = name();
179 }
180
181 Status CreateTensorArray(OpKernelContext* ctx, ResourceMgr* rm,
182 Tensor* tensor_array_output_handle,

Callers

nothing calls this directly

Calls 4

nameFunction · 0.85
GetAttrMethod · 0.45
HasAttrMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected