- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 22 for B_dims (0.09 sec)
-
tensorflow/c/eager/gradient_checker_test.cc
int64_t A_dims[] = {2, 2}; AbstractTensorHandlePtr A; { AbstractTensorHandle* A_raw; absl::Status s = TestTensorHandleWithDims<float, TF_FLOAT>( ctx_.get(), A_vals, A_dims, 2, &A_raw); ASSERT_EQ(errors::OK, s.code()) << s.message(); A.reset(A_raw); } float B_vals[] = {.5f, -1.0f, 1.0f, 1.0f}; int64_t B_dims[] = {2, 2}; AbstractTensorHandlePtr B; {
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:11:17 UTC 2024 - 6.5K bytes - Viewed (0) -
tensorflow/c/c_api_test.cc
const int num_dims = 2; int64_t* dims = new int64_t[num_dims]; int64_t num_elements = 1; dims[0] = batch_size; dims[1] = 1; for (int64_t i = 0; i < num_dims; ++i) { num_elements *= dims[i]; } TF_Tensor* t = TF_AllocateTensor(TF_STRING, dims, num_dims, sizeof(TF_TString) * num_elements); delete[] dims;
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 16:27:48 UTC 2024 - 97K bytes - Viewed (0) -
tensorflow/c/eager/c_api_unified_experimental_test.cc
*/ // Build an abstract input tensor. int64_t dims[] = {2, 2}; // Matrices will be 2 x 2 int num_dims = sizeof(dims) / sizeof(dims[0]); float vals[] = {0.0f, 0.0f, 0.0f, 0.0f}; TFE_Context* eager_ctx = TF_ExecutionContextGetTFEContext(ctx, status.get()); TFE_TensorHandle* t = TestMatrixTensorHandleWithInput(eager_ctx, vals, dims, num_dims);
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:11:17 UTC 2024 - 39.1K bytes - Viewed (0) -
tensorflow/c/c_api_experimental.cc
std::vector<DimensionHandle> dims; const TF_ShapeAndType& input_shape = input_shapes->items[i]; if (input_shape.num_dims == InferenceContext::kUnknownRank) { c.SetInput(i, c.UnknownShape()); continue; } dims.reserve(input_shape.num_dims); for (int j = 0; j < input_shape.num_dims; ++j) { dims.push_back(c.MakeDim(input_shape.dims[j])); } c.SetInput(i, c.MakeShape(dims));
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 16:27:48 UTC 2024 - 29.5K bytes - Viewed (0) -
tensorflow/c/eager/c_api_unified_experimental_graph.cc
return absl::OkStatus(); } std::vector<int64_t> dims(num_dims, kUnknownDim); TF_GraphGetTensorShape(graph_, output_, reinterpret_cast<int64_t*>(dims.data()), num_dims, &status); TF_RETURN_IF_ERROR(StatusFromTF_Status(&status)); TF_RETURN_IF_ERROR(tensorflow::TensorShapeUtils::MakeShape(dims, shape)); return absl::OkStatus(); }
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:11:17 UTC 2024 - 15.7K bytes - Viewed (0) -
tensorflow/c/eager/abstract_operation.h
virtual absl::Status SetAttrBool(const char* attr_name, bool value) = 0; virtual absl::Status SetAttrType(const char* attr_name, DataType value) = 0; virtual absl::Status SetAttrShape(const char* attr_name, const int64_t* dims, const int num_dims) = 0; virtual absl::Status SetAttrShape(const char* attr_name, const PartialTensorShape shape);
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:11:17 UTC 2024 - 7.3K bytes - Viewed (0) -
tensorflow/c/eager/gradients.cc
if (num_dims < 0) { proto.set_unknown_rank(true); } else { for (int d = 0; d < num_dims; ++d) { proto.add_dim()->set_size(dims[d]); } } forward_op_->attrs.Set(attr_name, proto); return op_->SetAttrShape(attr_name, dims, num_dims); } absl::Status SetAttrFunction(AbstractOperation* op_, const char* attr_name, const AbstractOperation* value,
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:11:17 UTC 2024 - 19.7K bytes - Viewed (0) -
tensorflow/c/eager/c_api.cc
} else { const auto num_dims = tensor_shape.dim_size(); std::unique_ptr<int64_t[]> dims(new int64_t[num_dims]); for (int i = 0; i < num_dims; ++i) { dims[i] = tensor_shape.dim(i).size(); } TFE_OpSetAttrShape(op, attr_name, dims.get(), num_dims, status); } } break; case tensorflow::AttrValue::kFunc: {
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:11:17 UTC 2024 - 43.9K bytes - Viewed (0) -
tensorflow/c/eager/gradients_internal.h
absl::Status SetAttrType(AbstractOperation*, const char* attr_name, DataType value, ForwardOperation*); absl::Status SetAttrShape(AbstractOperation*, const char* attr_name, const int64_t* dims, const int num_dims, ForwardOperation*); absl::Status SetAttrFunction(AbstractOperation*, const char* attr_name, const AbstractOperation* value, ForwardOperation*);
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:11:17 UTC 2024 - 4.7K bytes - Viewed (0) -
tensorflow/c/eager/dlpack.cc
DLManagedTensor* dlm_tensor = &tf_dlm_tensor_ctx->tensor; dlm_tensor->manager_ctx = tf_dlm_tensor_ctx; dlm_tensor->deleter = &DLManagedTensorDeleter; dlm_tensor->dl_tensor.device = tf_dlm_context; int ndim = tensor->dims(); dlm_tensor->dl_tensor.ndim = ndim; dlm_tensor->dl_tensor.data = tf_dlm_data; dlm_tensor->dl_tensor.dtype = tf_dlm_type; std::vector<int64_t>* shape_arr = &tf_dlm_tensor_ctx->shape;
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:11:17 UTC 2024 - 12.9K bytes - Viewed (0)