- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for CreateTestingEagerContext (0.45 sec)
-
tensorflow/c/experimental/saved_model/core/ops/variable_ops_test.cc
return handle; } class VariableOpsTest : public ::testing::Test { public: VariableOpsTest() : device_mgr_(testing::CreateTestingDeviceMgr()), ctx_(testing::CreateTestingEagerContext(device_mgr_.get())) {} EagerContext* context() { return ctx_.get(); } private: std::unique_ptr<StaticDeviceMgr> device_mgr_; EagerContextPtr ctx_; }; // Sanity check for variable creation
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Aug 21 19:26:54 UTC 2020 - 3.8K bytes - Viewed (0) -
tensorflow/c/experimental/saved_model/core/test_utils.h
std::unique_ptr<StaticDeviceMgr> CreateTestingDeviceMgr(); // Creates an EagerContext suitable for local tests. Does not take ownership // of `device_mgr`. EagerContextPtr CreateTestingEagerContext(DeviceMgr* device_mgr); // Converts a tensorflow::DatatypeSet to std::vector<DataType>. // This is useful for tests using GTest's ::testing::ValuesIn, since
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Aug 11 01:20:50 UTC 2021 - 3.5K bytes - Viewed (0) -
tensorflow/c/experimental/saved_model/core/saved_variable_loading_test.cc
TF_CHECK_OK(DeviceFactory::AddDevices( options, "/job:localhost/replica:0/task:0", &devices)); device_mgr_ = absl::make_unique<StaticDeviceMgr>(std::move(devices)); ctx_ = testing::CreateTestingEagerContext(device_mgr_.get()); } EagerContext* context() { return ctx_.get(); } private: std::unique_ptr<StaticDeviceMgr> device_mgr_; EagerContextPtr ctx_; };
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Feb 27 09:34:33 UTC 2024 - 6.2K bytes - Viewed (0) -
tensorflow/c/experimental/saved_model/core/ops/restore_ops_test.cc
} class RestoreOpsTest : public ::testing::Test { public: RestoreOpsTest() : device_mgr_(testing::CreateTestingDeviceMgr()), ctx_(testing::CreateTestingEagerContext(device_mgr_.get())) {} EagerContext* context() { return ctx_.get(); } private: std::unique_ptr<StaticDeviceMgr> device_mgr_; EagerContextPtr ctx_; };
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Apr 14 19:16:58 UTC 2023 - 4.2K bytes - Viewed (0) -
tensorflow/c/experimental/saved_model/core/constant_loading_test.cc
std::tuple<DataType, std::vector<int64_t>, bool>> { public: ConstantTest() : device_mgr_(testing::CreateTestingDeviceMgr()), ctx_(testing::CreateTestingEagerContext(device_mgr_.get())) {} EagerContext* context() { return ctx_.get(); } private: std::unique_ptr<StaticDeviceMgr> device_mgr_; EagerContextPtr ctx_; };
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Aug 11 01:20:50 UTC 2021 - 4.2K bytes - Viewed (0) -
tensorflow/c/experimental/saved_model/core/test_utils.cc
std::unique_ptr<StaticDeviceMgr> CreateTestingDeviceMgr() { return std::make_unique<StaticDeviceMgr>( DeviceFactory::NewDevice("CPU", {}, "/job:localhost/replica:0/task:0")); } EagerContextPtr CreateTestingEagerContext(DeviceMgr* device_mgr) { return EagerContextPtr(new EagerContext( SessionOptions(), tensorflow::ContextDevicePlacementPolicy::DEVICE_PLACEMENT_SILENT, /* async= */ false, device_mgr,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Sep 08 20:13:32 UTC 2023 - 5.8K bytes - Viewed (0) -
tensorflow/c/experimental/saved_model/core/tf_concrete_function_loading_test.cc
namespace { class SavedConcreteFunctionLoadingTest : public ::testing::Test { public: SavedConcreteFunctionLoadingTest() : device_mgr_(testing::CreateTestingDeviceMgr()), ctx_(testing::CreateTestingEagerContext(device_mgr_.get())) {} EagerContext* context() { return ctx_.get(); } private: std::unique_ptr<StaticDeviceMgr> device_mgr_; EagerContextPtr ctx_; };
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Apr 14 19:16:58 UTC 2023 - 10.6K bytes - Viewed (0)