- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 32 for to_tensor (0.06 sec)
-
tensorflow/c/c_test_util.h
using ::tensorflow::string; typedef std::unique_ptr<TF_Tensor, decltype(&TF_DeleteTensor)> unique_tensor_ptr; TF_Tensor* BoolTensor(int32_t v); // Create a tensor with values of type TF_INT8 provided by `values`. TF_Tensor* Int8Tensor(const int64_t* dims, int num_dims, const char* values); // Create a tensor with values of type TF_INT32 provided by `values`. TF_Tensor* Int32Tensor(const int64_t* dims, int num_dims,
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Thu Aug 09 01:06:53 UTC 2018 - 6K bytes - Viewed (0) -
tensorflow/c/eager/c_api_test_util.cc
if (TF_GetCode(status) != TF_OK) return nullptr; TFE_OpSetAttrType(op, "dtype", TF_FLOAT); TFE_OpAddInput(op, var_handle, status); // Convert 'value' to a TF_Tensor then a TFE_TensorHandle. std::unique_ptr<TF_Tensor, decltype(&TF_DeleteTensor)> t( TF_AllocateTensor(TF_FLOAT, nullptr, 0, sizeof(value)), TF_DeleteTensor); memcpy(TF_TensorData(t.get()), &value, TF_TensorByteSize(t.get()));
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Wed Feb 21 22:37:46 UTC 2024 - 23.5K bytes - Viewed (0) -
tensorflow/c/c_test_util.cc
static void FloatDeallocator(void* data, size_t, void* arg) { delete[] static_cast<float*>(data); } TF_Tensor* BoolTensor(bool v) { const int num_bytes = sizeof(bool); bool* values = new bool[1]; values[0] = v; return TF_NewTensor(TF_BOOL, nullptr, 0, values, num_bytes, &BoolDeallocator, nullptr); } TF_Tensor* Int8Tensor(const int64_t* dims, int num_dims, const char* values) { int64_t num_values = 1;
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Fri Oct 15 03:16:52 UTC 2021 - 17.8K bytes - Viewed (0) -
tensorflow/c/eager/gradient_checker.cc
theta_inputs[i] = inputs[i]; } AbstractTensorHandle* theta = theta_inputs[input_index]; // parameter we are grad checking // Convert from AbstractTensor to TF_Tensor. TF_Tensor* theta_tensor; TF_RETURN_IF_ERROR(GetValue(theta, &theta_tensor)); // Get number of elements and fill data. int num_elems = TF_TensorElementCount(theta_tensor); vector<float> theta_data(num_elems);
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:11:17 UTC 2024 - 7.3K bytes - Viewed (0) -
RELEASE.md
* Add `RaggedTensor.merge_dims()`. * Added new `uniform_row_length` row-partitioning tensor to `RaggedTensor`. * Add `shape` arg to `RaggedTensor.to_tensor`; Improve speed of `RaggedTensor.to_tensor`. * `tf.io.parse_sequence_example` and `tf.io.parse_single_sequence_example` now support ragged features. * Fix `while_v2` with variables in custom gradient.
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Tue Oct 22 14:33:53 UTC 2024 - 735.3K bytes - Viewed (0) -
tensorflow/c/BUILD
name = "tf_tensor_hdrs", hdrs = [ "tf_tensor.h", "tf_tensor_helper.h", ], visibility = ["//visibility:public"], deps = [ ":c_api_macros_hdrs", ":tf_datatype_hdrs", ":tf_status_headers", "//tensorflow/core/platform:status", ], ) cc_library( name = "tf_tensor", srcs = ["tf_tensor.cc"], hdrs = [ "tf_tensor.h",
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Nov 02 06:47:06 UTC 2024 - 30.4K bytes - Viewed (0) -
tensorflow/c/eager/dlpack.cc
return nullptr; } TF_DataType dtype; absl::Status s = TfDataTypeFormDlDataType(dl_tensor->dtype, &dtype); if (!s.ok()) { status->status = std::move(s); return nullptr; } int num_dims = dl_tensor->ndim; const int64_t* dims = dl_tensor->shape; void* data = dl_tensor->data; if (dl_tensor->byte_offset != 0) { status->status = tensorflow::errors::InvalidArgument(
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:11:17 UTC 2024 - 12.9K bytes - Viewed (0) -
tensorflow/c/c_api_test.cc
ASSERT_EQ(TF_OK, TF_GetCode(s_)) << TF_Message(s_); TF_Tensor* expected_out0 = expected_csession->output_tensor(0); TF_Tensor* expected_out1 = expected_csession->output_tensor(1); CompareTensors(out0, expected_out0); CompareTensors(out1, expected_out1); } void CompareTensors(TF_Tensor* a, TF_Tensor* b) { float* a_data = static_cast<float*>(TF_TensorData(a));
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 16:27:48 UTC 2024 - 97K bytes - Viewed (0) -
tensorflow/c/c_api_experimental_test.cc
} TEST_F(ShapeInferenceTest, InfersShapesFromInputTensors) { // Prepare some tensors for shape. TF_Tensor* tensor_1X6 = Int32Tensor({1, 6}); CHECK_EQ(TF_OK, TF_GetCode(status_)) << TF_Message(status_); TF_Tensor* tensor_1X1X6 = Int32Tensor({1, 1, 6}); CHECK_EQ(TF_OK, TF_GetCode(status_)) << TF_Message(status_);
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/c_api.h
TF_Tensor** value, TF_Status* status); // Fills in `values` with the TF_Tensor values of the attribute `attr_name` of // `oper`. `values` must point to an array of TF_Tensor* of length at least // `max_values` (ideally set to TF_AttrMetadata.list_size from
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Thu Oct 26 21:08:15 UTC 2023 - 82.3K bytes - Viewed (0)