- Sort Score
- Result 10 results
- Languages All
Results 91 - 100 of 1,123 for tftensor (0.26 sec)
-
tensorflow/cc/experimental/libtf/tests/variable_test.cc
CHECK_EQ(tensorflow::errors::OK, s.code()) << s.message(); ctx_.reset(ctx_raw); } }; template <typename T> void ExpectEquals(AbstractTensorHandle* t, T expected) { TF_Tensor* result_t; Status s = tensorflow::GetValue(t, &result_t); ASSERT_TRUE(s.ok()) << s.message(); auto value = static_cast<T*>(TF_TensorData(result_t)); EXPECT_EQ(*value, expected); TF_DeleteTensor(result_t); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 19 21:44:52 UTC 2023 - 4.5K bytes - Viewed (0) -
tensorflow/c/eager/parallel_device/parallel_device_testlib.h
template <typename value_type> void ExpectScalarEq(TFE_TensorHandle* handle, value_type expected_value) { std::unique_ptr<TF_Status, decltype(&TF_DeleteStatus)> status( TF_NewStatus(), TF_DeleteStatus); std::unique_ptr<TF_Tensor, decltype(&TF_DeleteTensor)> actual_value( TFE_TensorHandleResolve(handle, status.get()), TF_DeleteTensor); ASSERT_EQ(TF_GetCode(status.get()), TF_OK) << TF_Message(status.get());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Feb 09 01:12:35 UTC 2021 - 6.9K bytes - Viewed (0) -
tensorflow/c/eager/parallel_device/parallel_device_testlib.cc
const int num_bytes = sizeof(float); float* values = new float[1]; values[0] = v; std::unique_ptr<TF_Tensor, decltype(&TF_DeleteTensor)> tensor( TF_NewTensor(TF_FLOAT, nullptr, 0, values, num_bytes, &FloatDeallocator, nullptr), TF_DeleteTensor); return TensorHandlePtr(TFE_NewTensorHandle(tensor.get(), status)); } // Creates a rank-one TFE_TensorHandle with value `v`.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Jun 15 15:44:44 UTC 2021 - 12.5K 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: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Feb 21 22:37:46 UTC 2024 - 23.5K bytes - Viewed (0) -
tensorflow/c/eager/c_api_remote_test_util.cc
} auto* retval_task0 = TFE_TensorHandleCopyToDevice( retvals[0], ctx, "/job:localhost/replica:0/task:0/device:CPU:0", status); ASSERT_EQ(TF_GetCode(status), TF_OK) << TF_Message(status); TF_Tensor* t = TFE_TensorHandleResolve(retval_task0, status); ASSERT_EQ(TF_GetCode(status), TF_OK) << TF_Message(status); TFE_DeleteTensorHandle(retval_task0); float product[4] = {0};
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Dec 11 22:56:03 UTC 2020 - 9.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/utils/mangling_util.h
#include "absl/strings/string_view.h" #include "tensorflow/core/framework/tensor.pb.h" #include "tensorflow/core/framework/tensor_shape.pb.h" #include "tensorflow/core/framework/types.h" #include "tensorflow/core/lib/core/status.h" namespace tensorflow { namespace mangling_util { // The type of a mangled string. enum class MangledKind { kUnknown, kDataType, kTensorShape, kTensor };
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Oct 28 22:08:30 UTC 2020 - 2.4K bytes - Viewed (0) -
tensorflow/c/eager/c_api_experimental_test.cc
EXPECT_EQ(0, TFE_TensorHandleNumDims(handle_1, status)); ASSERT_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status); // Read the value of tensor handle `handle_1`. float value = 0.0f; TF_Tensor* t = TFE_TensorHandleResolve(handle_1, status); ASSERT_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status); ASSERT_EQ(sizeof(float), TF_TensorByteSize(t));
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Aug 03 03:14:26 UTC 2023 - 31.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/tfrt/ir/tfrt_fallback.cc
} /// Parse a type registered to this dialect. Type FallbackDialect::parseType(DialectAsmParser &parser) const { StringRef keyword; if (parser.parseKeyword(&keyword)) return Type(); if (keyword == "tf_tensor") return TFTensorType::get(getContext()); if (keyword == "tf_allocator") return TFAllocatorType::get(getContext()); parser.emitError(parser.getNameLoc(), "unknown type: ") << keyword; return Type(); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 2.4K bytes - Viewed (0) -
tensorflow/cc/framework/cc_op_gen_util.cc
case AttrValue::kType: return DataType_Name(attr_value.type()); case AttrValue::kShape: return PrintTensorShape(attr_value.shape()); case AttrValue::kTensor: return PrintTensorProto(attr_value.tensor()); case AttrValue::kList: { string ret = "{"; if (attr_value.list().s_size() > 0) { for (int i = 0; i < attr_value.list().s_size(); ++i) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon Feb 26 00:57:05 UTC 2024 - 25K bytes - Viewed (0) -
tensorflow/c/c_api_function_test.cc
TF_DeleteStatus(s_); } void Run(const std::vector<std::pair<TF_Operation*, TF_Tensor*>>& inputs, TF_Operation* output, int32_t expected_result) { Run(inputs, {{output, 0}}, {expected_result}); } // Run the host graph, which now contains a function and check that // outputs are as expected. // 'T' stands for 'tensor' since the outputs are tensors, not scalars.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Jul 20 22:08:54 UTC 2023 - 63.6K bytes - Viewed (0)