- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 18 for B_dims (0.05 sec)
-
tensorflow/c/eager/c_api_test_util.cc
constexpr int64_t dims[] = {100, 100}; constexpr int num_elements = dims[0] * dims[1]; float data[num_elements]; for (int i = 0; i < num_elements; ++i) { data[i] = 1.0f; } TF_Status* status = TF_NewStatus(); TF_Tensor* t = TFE_AllocateHostTensor(ctx, TF_FLOAT, &dims[0], sizeof(dims) / sizeof(int64_t), status);
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Wed Feb 21 22:37:46 UTC 2024 - 23.5K 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/c_api_experimental_test.cc
int num_dims = output_shapes->items[0].num_dims; int64_t* dims = output_shapes->items[0].dims; if (!expected_shape.has_value()) { EXPECT_EQ(num_dims, -1); EXPECT_EQ(dims, nullptr); return; } EXPECT_EQ(num_dims, expected_shape->size()); for (size_t i = 0; i < num_dims; ++i) { EXPECT_EQ(dims[i], (*expected_shape)[i]); }
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Tue Jan 17 22:27:52 UTC 2023 - 13.1K 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/c_test_util.cc
} TF_Tensor* Int8Tensor(const int64_t* dims, int num_dims, const char* values) { int64_t num_values = 1; for (int i = 0; i < num_dims; ++i) { num_values *= dims[i]; } TF_Tensor* t = TF_AllocateTensor(TF_INT8, dims, num_dims, sizeof(char) * num_values); memcpy(TF_TensorData(t), values, sizeof(char) * num_values); return t; } TF_Tensor* Int32Tensor(const int64_t* dims, int num_dims,
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Fri Oct 15 03:16:52 UTC 2021 - 17.8K 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/c_api_experimental.h
TF_CAPI_EXPORT extern TF_DataType TF_CheckpointReaderGetVariableDataType( TF_CheckpointReader* reader, const char* name); // Read the shape of a variable and write to `dims` TF_CAPI_EXPORT extern void TF_CheckpointReaderGetVariableShape( TF_CheckpointReader* reader, const char* name, int64_t* dims, int num_dims, TF_Status* status); // Get the number of dimension of a variable TF_CAPI_EXPORT extern int TF_CheckpointReaderGetVariableNumDims(
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Thu Apr 27 21:07:00 UTC 2023 - 15.1K 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)