- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 28 for num_dims (0.11 sec)
-
tensorflow/c/eager/gradient_checker.cc
int32_t step = 1) { for (int32_t i = start; i < end; i += step) { (*data)[i] = i; } } // Fills out_dims with the dimensions of the given tensor. void GetDims(const TF_Tensor* t, int64_t* out_dims) { int num_dims = TF_NumDims(t); for (int i = 0; i < num_dims; i++) { out_dims[i] = TF_Dim(t, i); } } // Runs model as is if output is a scalar, // else sums the output tensor before returning.
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
const int64_t** dims, const int* num_dims, int num_values, ForwardOperation* forward_op_) { std::unique_ptr<TensorShapeProto[]> proto(new TensorShapeProto[num_values]); for (int i = 0; i < num_values; ++i) { const auto num_dims_i = num_dims[i]; if (num_dims_i > TensorShape::MaxDimensions()) { return errors::InvalidArgument(
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_unified_experimental_graph.cc
DCHECK(shape != nullptr); TF_Status status; int num_dims = TF_GraphGetTensorNumDims(graph_, output_, &status); DCHECK_GE(num_dims, -1); TF_RETURN_IF_ERROR(StatusFromTF_Status(&status)); if (num_dims == kUnknownRank) { return absl::OkStatus(); } std::vector<int64_t> dims(num_dims, kUnknownDim); TF_GraphGetTensorShape(graph_, output_,
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_api_experimental.cc
const int64_t* dims, int num_dims) { DCHECK(index >= 0 && index < shape_list->num_items); TF_ShapeAndType& shape = shape_list->items[index]; DCHECK(shape.dims == nullptr) << "Shape at " << index << " is already set!"; DCHECK(num_dims >= 0) << "Number of dimensions cannot be negative!"; shape.num_dims = num_dims; shape.dims = new int64_t[num_dims]; memcpy(shape.dims, dims, sizeof(int64_t) * num_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.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/c_api_test_util.h
int num_dims); // Get a Matrix TensorHandle with given float values and dimensions TFE_TensorHandle* TestTensorHandleWithDimsFloat(TFE_Context* ctx, float data[], int64_t dims[], int num_dims); // Get a Matrix TensorHandle with given int values and dimensions
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Mon Jul 17 23:43:59 UTC 2023 - 7.7K bytes - Viewed (0) -
tensorflow/c/c_api_experimental_test.cc
CHECK_EQ(output_shapes->num_items, 1); 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_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); TF_AbstractTensor* at = TF_CreateAbstractTensorFromEagerTensor(
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.h
TF_Status* status); // Fills in `dims` with the list of shapes in the attribute `attr_name` of // `oper` and `num_dims` with the corresponding number of dimensions. On return, // for every i where `num_dims[i]` > 0, `dims[i]` will be an array of // `num_dims[i]` elements. A value of -1 for `num_dims[i]` indicates that the
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Thu Oct 26 21:08:15 UTC 2023 - 82.3K bytes - Viewed (0) -
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)