- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for rank (0.14 sec)
-
tensorflow/c/c_api.cc
} tensorflow::shape_inference::ShapeHandle shape = ic->output(output.index); int rank = -1; if (ic->RankKnown(shape)) { rank = ic->Rank(shape); } if (num_dims != rank) { status->status = InvalidArgument("Expected rank is ", num_dims, " but actual rank is ", rank); return; } if (num_dims == 0) { // Output shape is a scalar.
C++ - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Mon Apr 15 03:35:10 GMT 2024 - 102.3K bytes - Viewed (0) -
tensorflow/c/c_api_experimental.cc
C++ - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Mon Apr 15 03:35:10 GMT 2024 - 29.4K bytes - Viewed (0) -
tensorflow/c/eager/gradients.cc
C++ - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Thu Feb 15 09:49:45 GMT 2024 - 19.3K bytes - Viewed (0) -
tensorflow/c/eager/unified_api_test.cc
PartialTensorShape shape; TF_RETURN_IF_ERROR(inputs[0]->Shape(&shape)); if (shape.dims() != 2) { return errors::InvalidArgument( "Tensor expected to have rank 2 found rank: ", shape.dims()); } int64_t dim_sizes[] = {2, 4}; for (int i = 0; i < shape.dims(); i++) { if (shape.dim_size(i) != dim_sizes[i]) { return errors::InvalidArgument("Dim ", i, " expected to be of size ",
C++ - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Tue Feb 27 13:57:45 GMT 2024 - 6.7K bytes - Viewed (0) -
tensorflow/c/eager/parallel_device/parallel_device_lib.cc
return errors::Unimplemented(absl::StrCat( "Computing the shape of a ParallelTensor when the components do " "not all have the same rank is not supported. One tensor had " "shape ", first_shape.DebugString(), " and another had shape ", component_shape.DebugString())); } else {
C++ - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Fri Feb 09 07:47:20 GMT 2024 - 25.4K bytes - Viewed (1) -
tensorflow/c/eager/c_api_unified_experimental_graph.cc
TF_RETURN_IF_ERROR( operation->SetOpName(absl::StrCat("_input_", inputs_.size()).c_str())); TF_RETURN_IF_ERROR(operation->SetAttrType("dtype", dtype)); if (!shape.unknown_rank()) { TF_RETURN_IF_ERROR(operation->SetAttrShape( "shape", reinterpret_cast<int64_t*>(shape.dim_sizes().data()), shape.dims())); } int num_outputs = 1;
C++ - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Tue Mar 12 20:00:09 GMT 2024 - 15.4K bytes - Viewed (1) -
tensorflow/c/eager/c_api.cc
static_cast<TF_DataType>(default_value.type())); break; case tensorflow::AttrValue::kShape: { const auto& tensor_shape = default_value.shape(); if (tensor_shape.unknown_rank()) { TFE_OpSetAttrShape(op, attr_name, nullptr, -1, status); } else { const auto num_dims = tensor_shape.dim_size(); std::unique_ptr<int64_t[]> dims(new int64_t[num_dims]);
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_test.cc
ASSERT_EQ(TF_OK, TF_GetCode(s)) << TF_Message(s); EXPECT_EQ(dims[0], returned_dims[0]); EXPECT_EQ(dims[1], returned_dims[1]); // Try to set 'unknown' with unknown rank on the shape and see that // it doesn't change. TF_GraphSetTensorShape(graph, feed_out_0, /*dims=*/nullptr, -1, s); EXPECT_EQ(TF_OK, TF_GetCode(s)) << TF_Message(s);
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)