- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 15 for TaggedValue (0.17 sec)
-
tensorflow/cc/experimental/libtf/function.h
TaggedValue input_signature, TaggedValue output_signature); // Executes this function under the execution context. // // Raises an error is no matching signature is found for TaggedValue. tensorflow::StatusOr<TaggedValue> Execute(tensorflow::AbstractContext*, TaggedValue) const; private:
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Aug 30 21:44:45 UTC 2022 - 1.9K bytes - Viewed (0) -
tensorflow/cc/experimental/libtf/value.h
TaggedValue& operator=(TaggedValue&& v) { destroy(); MoveIntoUnion(std::move(v)); return *this; } /// Move constructor. TaggedValue(TaggedValue&& v) : type_(NONE) { MoveIntoUnion(std::move(v)); } /// Copy constructor. TaggedValue(const TaggedValue& v) : type_(NONE) { CopyIntoUnion(v); } /// Copy assignment operator. TaggedValue& operator=(const TaggedValue& v) { destroy();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Sat Apr 13 05:23:45 UTC 2024 - 20.4K bytes - Viewed (0) -
tensorflow/cc/experimental/libtf/tests/tensor_test.cc
ASSERT_FALSE(x->RefCountIsOne()); } ASSERT_TRUE(x->RefCountIsOne()); } TaggedValue MakeScalarTensor(TaggedValue self, TaggedValue val) { if (val.type() != TaggedValue::FLOAT32) return TaggedValue::None(); if (self.type() != TaggedValue::DICT) return TaggedValue::None(); TaggedValue ctx_capsule = (self.dict())[TaggedValue("context")]; AbstractContext* ctx = static_cast<AbstractContext*>(ctx_capsule.capsule());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 19 21:44:52 UTC 2023 - 5K bytes - Viewed (0) -
tensorflow/cc/experimental/libtf/tests/function_test.cc
Function tf_function; PartialTensorShape unknown_shape; TaggedValue signature(unknown_shape, DT_FLOAT); Status s = tf_function.RegisterTrace(std::move(trace), signature, signature); ASSERT_TRUE(s.ok()) << s.message(); TaggedValue args = TaggedValue::Tuple(); args.tuple().emplace_back(TaggedValue(x)); args.tuple().emplace_back(TaggedValue(x)); StatusOr<TaggedValue> v = tf_function.Execute(ctx_.get(), args);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 19 21:44:52 UTC 2023 - 11.1K bytes - Viewed (0) -
tensorflow/cc/experimental/libtf/function.cc
return call_op->Execute(outputs, &num_outputs); } Status VerifySupportedSignature(TaggedValue signature) { if (signature.type() == TaggedValue::Type::TENSOR_SPEC) { return ::tensorflow::OkStatus(); } if (signature.type() == TaggedValue::Type::TUPLE) { for (const auto& t : signature.tuple()) { if (t.type() != TaggedValue::Type::TENSOR_SPEC) { break; } } return ::tensorflow::OkStatus();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon Mar 04 19:49:06 UTC 2024 - 9.1K bytes - Viewed (0) -
tensorflow/cc/experimental/libtf/tests/value_test.cc
} TEST(Test1, TestDict) { TaggedValue s1("test1"); TaggedValue s2("test2"); TaggedValue d = TaggedValue::Dict(); d.dict()[s2] = TaggedValue(6.f); std::stringstream stream; stream << d; ASSERT_EQ(stream.str(), "{test2: 6, }"); } namespace { TaggedValue add(TaggedValue args, TaggedValue kwargs) { if (args.type() == TaggedValue::TUPLE) { return TaggedValue(args.tuple()[0].f32() + args.tuple()[1].f32());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Sep 01 11:18:25 UTC 2022 - 3.4K bytes - Viewed (0) -
tensorflow/cc/experimental/libtf/object.h
inline TaggedValue::Type TypeToTaggedType<String>() { return TaggedValue::Type::STRING; } /// Retrieves tagged type of Callable handle. template <> inline TaggedValue::Type TypeToTaggedType<Callable>() { return TaggedValue::Type::FUNC; } /// Retrieves tagged type of Integer handle. template <> inline TaggedValue::Type TypeToTaggedType<Integer>() { return TaggedValue::Type::INT64; } /// Retrieves tagged type of Float handle.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu May 11 08:05:36 UTC 2023 - 23.6K bytes - Viewed (0) -
tensorflow/cc/experimental/libtf/runtime/runtime.cc
using tensorflow::tracing::graph::GraphFunction; TaggedValue MakeCallable(const std::string& fn_name, Function fn, AbstractContext* ctx) { auto CallFn = [fn_name, fn, ctx](TaggedValue args_, TaggedValue kwargs_) -> TaggedValue { std::cout << "Calling " << fn_name << std::endl; tensorflow::StatusOr<TaggedValue> v = fn.Execute(ctx, args_); return v.value(); };
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Sep 01 11:18:25 UTC 2022 - 7.4K bytes - Viewed (0) -
tensorflow/cc/experimental/libtf/tests/perf_test.cc
#include "tensorflow/core/platform/test.h" #include "tensorflow/core/platform/test_benchmark.h" namespace tf { namespace libtf { namespace { // AddTagged using tagged values TaggedValue AddTagged(TaggedValue args, TaggedValue kwargs) { return TaggedValue(args.tuple()[0].i64() + args.tuple()[1].i64()); } int64_t AddRaw(int64_t a, int64_t b) { return a + b; } } // namespace // Add numbers in a loop by calling a callable.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Jul 15 16:58:38 UTC 2021 - 3K bytes - Viewed (0) -
tensorflow/cc/experimental/libtf/mlir/mlir_transform.cc
return None(); } // Make a module to wrap MLIR module and allow getting strings and running // transforms. // auto obj = TaggedValue::Dict(); Object obj; obj.Set( String("_module"), Handle(impl::TaggedValue::Capsule(new mlir::OwningOpRef<mlir::ModuleOp>( std::move(module_or).value())))); auto get_string = [](Object self) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Jul 12 16:28:19 UTC 2022 - 3K bytes - Viewed (0)