Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for EagerContextPtr (0.2 sec)

  1. 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)
  2. tensorflow/c/experimental/saved_model/core/ops/variable_ops_test.cc

            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
    TEST_F(VariableOpsTest, CreateVariableSuccessful) {
      // Create a DT_Resource TensorHandle that points to a scalar DT_FLOAT tensor
      ImmediateTensorHandlePtr handle;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Aug 21 19:26:54 UTC 2020
    - 3.8K bytes
    - Viewed (0)
  3. tensorflow/c/experimental/saved_model/core/test_utils.h

    // Creates a DeviceMgr suitable for local tests.
    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)
  4. tensorflow/c/experimental/saved_model/core/saved_variable_loading_test.cc

        ctx_ = testing::CreateTestingEagerContext(device_mgr_.get());
      }
    
      EagerContext* context() { return ctx_.get(); }
    
     private:
      std::unique_ptr<StaticDeviceMgr> device_mgr_;
      EagerContextPtr ctx_;
    };
    
    // Sanity check that constructing a tensorflow::Variable from a SavedVariable
    // 1. does not cause an error
    // 2. preserves dtype and shape.
    TEST_P(SavedVariableLoadingTest, LoadSavedVariableSuccessful) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Feb 27 09:34:33 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  5. tensorflow/c/experimental/saved_model/core/ops/restore_ops_test.cc

            ctx_(testing::CreateTestingEagerContext(device_mgr_.get())) {}
    
      EagerContext* context() { return ctx_.get(); }
    
     private:
      std::unique_ptr<StaticDeviceMgr> device_mgr_;
      EagerContextPtr ctx_;
    };
    
    // One way of obtaining the checkpointa checkpoint's tensor names is:
    // bazel run //tensorflow/python/tools:inspect_checkpoint -- --all_tensors
    // --file_name="$CKPT_PREFIX".
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 14 19:16:58 UTC 2023
    - 4.2K bytes
    - Viewed (0)
  6. tensorflow/c/experimental/saved_model/core/constant_loading_test.cc

            ctx_(testing::CreateTestingEagerContext(device_mgr_.get())) {}
    
      EagerContext* context() { return ctx_.get(); }
    
     private:
      std::unique_ptr<StaticDeviceMgr> device_mgr_;
      EagerContextPtr ctx_;
    };
    
    // Basic sanity check that roundtripping a Tensor->Tensorproto->Constant
    // preserves values.
    TEST_P(ConstantTest, CreateConstantSuccessful) {
      // Get test parameters
      auto& test_params = GetParam();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Aug 11 01:20:50 UTC 2021
    - 4.2K bytes
    - Viewed (0)
  7. tensorflow/c/experimental/saved_model/core/tf_concrete_function_loading_test.cc

            ctx_(testing::CreateTestingEagerContext(device_mgr_.get())) {}
    
      EagerContext* context() { return ctx_.get(); }
    
     private:
      std::unique_ptr<StaticDeviceMgr> device_mgr_;
      EagerContextPtr ctx_;
    };
    
    class DummyCapture : public TensorHandleConvertible {
     public:
      DummyCapture(ImmediateExecutionContext* ctx, int8_t value)
          : TensorHandleConvertible(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 14 19:16:58 UTC 2023
    - 10.6K bytes
    - Viewed (0)
Back to top