- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 40 for num_dims (0.33 sec)
-
tensorflow/c/eager/c_api_test_util.cc
float data[], int64_t dims[], int num_dims) { TF_Status* status = TF_NewStatus(); TF_Tensor* t = TFE_AllocateHostTensor(ctx, TF_FLOAT, &dims[0], num_dims, status); memcpy(TF_TensorData(t), &data[0], TF_TensorByteSize(t)); TFE_TensorHandle* th = TFE_NewTensorHandleFromTensor(ctx, 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/gradients_internal.h
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/c_api_unified_experimental.cc
return nullptr; } tensorflow::PartialTensorShape partial_shape; if (shape.num_dims != -1) { DCHECK(shape.dim_sizes != nullptr); Status status = tensorflow::PartialTensorShape::MakePartialShape( reinterpret_cast<int64_t*>(shape.dim_sizes), shape.num_dims, &partial_shape); if (!status.ok()) { tsl::Set_TF_Status_from_Status(s, status); return nullptr;
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:11:17 UTC 2024 - 9K bytes - Viewed (0) -
tensorflow/c/eager/dlpack.cc
return nullptr; } size_t total_bytes = dl_tensor->dtype.bits / 8; for (int i = 0; i < num_dims; i++) { total_bytes *= dims[i]; } if (dl_tensor->strides != nullptr && !IsValidStrideCompactRowMajorData(dl_tensor->shape, dl_tensor->strides, num_dims)) { status->status = tensorflow::errors::InvalidArgument( "Invalid strides array from DLPack");
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:11:17 UTC 2024 - 12.9K 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/c_api_test.cc
TEST(CAPI, TestTensorNonScalarBytesAllocateDelete) { const int batch_size = 4; 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);
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/abstract_operation.h
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); virtual absl::Status SetAttrFunction(const char* attr_name,
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/c_api_experimental.h
// 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( TF_CheckpointReader* reader, const char* name); // Load the weight of a variable
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/c_api.cc
tensorflow::shape_inference::ShapeHandle ShapeHandleFromDims( tensorflow::shape_inference::InferenceContext* ic, int num_dims, const int64_t* dims) { if (num_dims != -1) { std::vector<tensorflow::shape_inference::DimensionHandle> dim_vec; dim_vec.reserve(num_dims); for (int i = 0; i < num_dims; ++i) { dim_vec.push_back(ic->MakeDim(dims[i])); } return ic->MakeShape(dim_vec); } else {
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 16:27:48 UTC 2024 - 102.3K bytes - Viewed (0) -
tensorflow/c/eager/parallel_device/parallel_device_lib_test.cc
ASSERT_TRUE(TF_GetCode(status.get()) == TF_OK) << TF_Message(status.get()); TFE_OpSetAttrType(handle_op.get(), "dtype", TF_FLOAT); TFE_OpSetAttrShape(handle_op.get(), "shape", /*dims=*/nullptr, /*num_dims=*/0, status.get()); ASSERT_TRUE(TF_GetCode(status.get()) == TF_OK) << TF_Message(status.get()); auto outputs = parallel_device.Execute(context.get(), std::vector<ParallelTensor*>(),
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Mon Oct 21 04:14:14 UTC 2024 - 15.6K bytes - Viewed (0)