- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for dim_size (0.5 sec)
-
tensorflow/c/eager/unified_api_test.cc
} 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 ", dim_sizes[i], " found: ", shape.dim_size(i)); } } return absl::OkStatus(); } TEST_P(UnifiedAPI, TestTensorShape2x4) {
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/c_api.cc
static char empty; int64_t nelems = 1; std::vector<int64_t> dims; dims.reserve(shape.dims()); for (int i = 0; i < shape.dims(); ++i) { dims.push_back(shape.dim_size(i)); nelems *= shape.dim_size(i); } CHECK_EQ(nelems, 0); return TF_NewTensor( dtype, reinterpret_cast<const int64_t*>(dims.data()), shape.dims(),
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/eager/dlpack.cc
std::vector<int64_t>* stride_arr = &tf_dlm_tensor_ctx->strides; shape_arr->resize(ndim); stride_arr->resize(ndim, 1); for (int i = 0; i < ndim; i++) { (*shape_arr)[i] = tensor->dim_size(i); } for (int i = ndim - 2; i >= 0; --i) { (*stride_arr)[i] = (*shape_arr)[i + 1] * (*stride_arr)[i + 1]; } dlm_tensor->dl_tensor.shape = shape_arr->data();
C++ - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Thu Feb 15 09:49:45 GMT 2024 - 12.8K bytes - Viewed (0) -
tensorflow/c/eager/parallel_device/parallel_device_lib.cc
for (int axis_index = 0; axis_index < combined_shape.dims(); ++axis_index) { int64_t axis_length = combined_shape.dim_size(axis_index); if (axis_length != component_shape.dim_size(axis_index)) { axis_length = -1; } TF_RETURN_IF_ERROR( combined_shape.SetDimWithStatus(axis_index, axis_length)); } }
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/c_api_experimental.cc
status->status = InvalidArgument("Expected rank is ", num_dims, " but actual rank is ", rank); return; } for (int i = 0; i < num_dims; i++) { dims[i] = shape.dim_size(i); } } int TF_CheckpointReaderGetVariableNumDims(TF_CheckpointReader* reader, const char* name) { const auto& m = reader->GetVariableToShapeMap();
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/c_api.cc
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]); for (int i = 0; i < num_dims; ++i) { dims[i] = tensor_shape.dim(i).size(); }
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)