- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 25 for dim (0.13 sec)
-
tensorflow/c/experimental/gradients/grad_test_helper.cc
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); num_elem_analytical *= dim_analytical; } float* danalytical = new float[num_elem_analytical]{0}; memcpy(&danalytical[0], TF_TensorData(analytical_tensor),
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/unified_api_test.cc
"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 ", dim_sizes[i], " found: ", shape.dim_size(i)); } } return absl::OkStatus(); }
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/immediate_execution_tensor_handle.h
// ImmediateExecutionTensorHandles, but comes up for example when computing // the shape of a parallel tensor with component shapes differing across // devices. virtual Status Dim(int dim_index, int64_t* dim) const = 0; // Returns the device which created the handle. virtual const char* DeviceName(Status* status) const = 0; // Returns the device where the tensor was placed.
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/experimental/grappler/grappler_test.cc
TF_ASSERT_OK(s); EXPECT_EQ(DT_FLOAT, in_props.dtype()); EXPECT_FALSE(in_props.shape().unknown_rank()); EXPECT_EQ(2, in_props.shape().dim_size()); EXPECT_EQ(10, in_props.shape().dim(0).size()); EXPECT_EQ(1, in_props.shape().dim(1).size()); for (int i = 0; i < in_props_buf.size(); i++) TF_DeleteBuffer(in_props_buf[i]); } }
C++ - Registered: Tue Feb 27 12:39:08 GMT 2024 - Last Modified: Thu Apr 13 22:30:58 GMT 2023 - 11.6K bytes - Viewed (0) -
tensorflow/c/experimental/gradients/nn_grad.cc
} auto imm_ctx = dyn_cast<ImmediateExecutionContext>(ctx); AbstractTensorPtr minus_1(imm_ctx->CreateInt32Scalar(-1)); ImmediateTensorHandlePtr dim(imm_ctx->CreateLocalHandle(minus_1.get())); AbstractTensorHandle* expand_dims_outputs; TF_RETURN_IF_ERROR( ops::ExpandDims(ctx, vec, dim.get(), &expand_dims_outputs, "ExpandDims")); TF_RETURN_IF_ERROR( ops::Mul(ctx, expand_dims_outputs, mat, &outputs[0], "Mul"));
C++ - Registered: Tue Mar 26 12:39:09 GMT 2024 - Last Modified: Wed Feb 28 13:53:47 GMT 2024 - 5.7K bytes - Viewed (0) -
tensorflow/c/eager/c_api.cc
} int64_t TFE_TensorHandleDim(TFE_TensorHandle* h, int dim_index, TF_Status* status) { if (h == nullptr) { status->status = tensorflow::errors::InvalidArgument("Invalid handle"); return -1; } int64_t dim = -1; status->status = tensorflow::unwrap(h)->Dim(dim_index, &dim); return dim; }
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/eager/parallel_device/parallel_device_lib.cc
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)); } } } auto dim_sizes = combined_shape.dim_sizes(); shape_ = std::vector<int64_t>(dim_sizes.begin(), dim_sizes.end()); }
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/experimental/gradients/tape/tape_operation.cc
} TensorShapeProto proto; if (num_dims < 0) { proto.set_unknown_rank(true); } else { for (int d = 0; d < num_dims; ++d) { proto.add_dim()->set_size(dims[d]); } } forward_op_.attrs.Set(attr_name, proto); return parent_op_->SetAttrShape(attr_name, dims, num_dims); } Status TapeOperation::SetAttrFunction(const char* attr_name,
C++ - Registered: Tue Feb 27 12:39:08 GMT 2024 - Last Modified: Tue Jun 07 01:53:35 GMT 2022 - 9K bytes - Viewed (1) -
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; }
C++ - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Thu Feb 15 09:49:45 GMT 2024 - 9K bytes - Viewed (0) -
tensorflow/c/eager/c_api.h
TF_CAPI_EXPORT extern int TFE_TensorDebugInfoOnDeviceNumDims( TFE_TensorDebugInfo* debug_info); // Returns the number of elements in dimension `dim_index`. // Tensor representation on device can be transposed from its representation // on host. The data contained in dimension `dim_index` on device // can correspond to the data contained in another dimension in on-host // representation. The dimensions are indexed using the standard TensorFlow
C - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Thu Apr 27 21:07:00 GMT 2023 - 22.8K bytes - Viewed (1)