- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for NumDims (0.29 sec)
-
tensorflow/c/eager/gradient_checker.cc
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.
C++ - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Thu Feb 15 09:49:45 GMT 2024 - 7.3K bytes - Viewed (0) -
tensorflow/c/experimental/gradients/grad_test_helper.cc
TF_Tensor* analytical_tensor; auto s = GetValue(t, &analytical_tensor); ASSERT_EQ(errors::OK, s.code()) << s.message(); int64_t num_elem_analytical = 1; auto num_dims_analytical = TF_NumDims(analytical_tensor); ASSERT_EQ(dims.size(), num_dims_analytical); for (int j = 0; j < num_dims_analytical; j++) { auto dim_analytical = TF_Dim(analytical_tensor, j); ASSERT_EQ(dims[j], dim_analytical);
C++ - Registered: Tue Mar 26 12:39:09 GMT 2024 - Last Modified: Wed Feb 28 13:53:47 GMT 2024 - 5K bytes - Viewed (0) -
tensorflow/c/eager/c_api_debug.cc
namespace { std::vector<int64_t> TensorShapeAsVector(const tensorflow::TensorHandle& handle, tensorflow::Status* status) { std::vector<int64_t> shape; int rank = -1; *status = handle.NumDims(&rank); if (!status->ok()) { return shape; } shape.reserve(rank); for (int i = 0; i < rank; ++i) { int64_t dim; *status = handle.Dim(i, &dim); if (!status->ok()) { return shape;
C++ - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Wed Aug 11 01:20:50 GMT 2021 - 2.5K bytes - Viewed (0) -
tensorflow/c/eager/immediate_execution_tensor_handle.h
// is needed a static_cast can be applied. class ImmediateExecutionTensorHandle : public AbstractTensorHandle { public: // Returns number of dimensions. virtual Status NumDims(int* num_dims) const = 0; // Returns number of elements across all dimensions. virtual Status NumElements(int64_t* num_elements) const = 0; // Returns size of specified dimension //
C - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Fri Mar 10 21:56:24 GMT 2023 - 4.3K bytes - Viewed (0) -
tensorflow/c/c_api_test.cc
ASSERT_EQ(TF_OK, TF_GetCode(s_)) << TF_Message(s_); ASSERT_NE(nullptr, value); EXPECT_EQ(TF_INT8, TF_TensorType(value)); EXPECT_EQ(ndims, TF_NumDims(value)); for (int i = 0; i < TF_NumDims(value); ++i) { EXPECT_EQ(dims[i], TF_Dim(value, i)) << i; } EXPECT_EQ(sizeof(char) * TF_ARRAYSIZE(tensor), TF_TensorByteSize(value));
C++ - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Mon Apr 15 03:35:10 GMT 2024 - 96.9K bytes - Viewed (3) -
tensorflow/c/eager/c_api.cc
if (h == nullptr) { status->status = tensorflow::errors::InvalidArgument("Invalid handle"); return -1; } int num_dims = -1; status->status = tensorflow::unwrap(h)->NumDims(&num_dims); return num_dims; } int64_t TFE_TensorHandleNumElements(TFE_TensorHandle* h, TF_Status* status) { if (h == nullptr) { status->status = tensorflow::errors::InvalidArgument("Invalid handle");
C++ - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Tue Mar 12 20:00:09 GMT 2024 - 43.9K bytes - Viewed (2) -
tensorflow/c/c_api_function_test.cc
for (int i = 0; i < expected_results.size(); ++i) { TF_Tensor* out = csession.output_tensor(i); ASSERT_TRUE(out != nullptr); EXPECT_EQ(TF_INT32, TF_TensorType(out)); EXPECT_EQ(1, TF_NumDims(out)); CompareInt32Tensor(expected_results[i], out); } } // Run the host graph, which now contains a function and check that // outputs are as expected.
C++ - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Thu Jul 20 22:08:54 GMT 2023 - 63.6K bytes - Viewed (6)