Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for ClientSession (0.36 sec)

  1. tensorflow/cc/client/client_session.cc

      mutable mutex mu_;
      mutable int last_num_graph_nodes_ TF_GUARDED_BY(mu_) = 0;
    };
    
    ClientSession::ClientSession(const Scope& scope, const string& target)
        : ClientSession(scope, Impl::MakeDefaultSessionOptions(target)) {}
    
    ClientSession::ClientSession(const Scope& scope) : ClientSession(scope, "") {}
    
    ClientSession::ClientSession(const Scope& scope,
                                 const SessionOptions& session_options) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Feb 28 09:04:10 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  2. tensorflow/cc/client/client_session_test.cc

          TF_EXPECT_OK(session.Run(RunOptions(), ClientSession::FeedType{}, {b}, {},
                                   &outputs, nullptr, thread::ThreadPoolOptions()));
          test::ExpectTensorEqual<int>(outputs[0],
                                       test::AsTensor<int>({3, 8}, {2}));
        });
      }
      auto c = Sub(root, b, a);
      std::vector<Tensor> outputs;
      TF_EXPECT_OK(session.Run(RunOptions(), ClientSession::FeedType{}, {c}, {},
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Sep 06 19:12:29 UTC 2023
    - 9.5K bytes
    - Viewed (0)
  3. tensorflow/cc/client/client_session.h

      ClientSession(const Scope& scope, const string& target);
    
      /// Same as above, but use the empty string ("") as the target specification.
      explicit ClientSession(const Scope& scope);
    
      /// Create a new session, configuring it with `session_options`.
      ClientSession(const Scope& scope, const SessionOptions& session_options);
    
      ~ClientSession();
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Sep 20 08:11:46 UTC 2022
    - 6.1K bytes
    - Viewed (0)
  4. tensorflow/cc/framework/testutil.cc

    #include "tensorflow/core/graph/default_device.h"
    
    namespace tensorflow {
    namespace test {
    
    void GetTensors(const Scope& scope, OutputList tensors,
                    std::vector<Tensor>* out) {
      ClientSession session(scope);
      TF_CHECK_OK(session.Run(tensors, out));
    }
    
    void GetTensor(const Scope& scope, Output tensor, Tensor* out) {
      std::vector<Tensor> outputs;
      GetTensors(scope, {std::move(tensor)}, &outputs);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Sep 07 06:52:56 UTC 2017
    - 1.8K bytes
    - Viewed (0)
  5. tensorflow/cc/gradients/resource_variable_grad_test.cc

      OutputList dxs;
      TF_ASSERT_OK(AddSymbolicGradients(scope, {y}, {var}, {dy}, &dxs));
    
      ClientSession::FeedType feed_list;
      feed_list.insert({x, 5.0f});
      feed_list.insert({dy, 1.0f});
    
      std::vector<Tensor> dxout;
      ClientSession session(scope);
      TF_ASSERT_OK(session.Run(feed_list, dxs, &dxout));
    
      auto grad = dxout[0].scalar<float>()();
      EXPECT_EQ(grad, 5.0f);
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 14 15:30:48 UTC 2021
    - 2.2K bytes
    - Viewed (0)
  6. tensorflow/cc/framework/while_gradients_test.cc

      }
    
      template <typename T>
      void Run(const std::vector<Input::Initializer>& input_values,
               const std::vector<T>& expected_grad_values) {
        Run<T>(ClientSession(scope_), input_values, expected_grad_values);
      }
    
      template <typename T>
      void Run(const ClientSession& session,
               const std::vector<Input::Initializer>& input_values,
               const std::vector<T>& expected_grad_values,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Sep 27 20:32:17 UTC 2017
    - 7.7K bytes
    - Viewed (0)
  7. tensorflow/cc/ops/while_loop_test.cc

      }
    
      template <typename T>
      void Run(const std::vector<Input::Initializer>& input_values,
               const std::vector<T>& expected_output_values) {
        ClientSession session(scope_);
    
        DCHECK_EQ(input_values.size(), inputs_.size());
        ClientSession::FeedType feeds;
        for (int i = 0; i < inputs_.size(); ++i) {
          feeds.emplace(inputs_[i], input_values[i]);
        }
    
        std::vector<Tensor> out_tensors;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 13 22:30:58 UTC 2023
    - 6.4K bytes
    - Viewed (0)
  8. tensorflow/cc/framework/gradient_checker.cc

            unit_dimension++;
          }
        }
      }
      return absl::OkStatus();
    }
    
    Status EvaluateGraph(ClientSession* session, const OutputList& xs,
                         const OutputList& ys, std::vector<Tensor>* x_datas,
                         std::vector<Tensor>* y_datas) {
      // Create the feed list.
      ClientSession::FeedType feed_list;
      for (int i = 0; i < x_datas->size(); i++) {
        feed_list.insert({xs[i], (*x_datas)[i]});
      }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Apr 13 05:57:22 UTC 2024
    - 18.2K bytes
    - Viewed (0)
  9. tensorflow/cc/framework/gradients_test.cc

      // Requesting the gradients for y0 and y2 should return the sum of their
      // individual gradients.
      std::vector<Output> grad_outputs;
      TF_EXPECT_OK(AddSymbolicGradients(scope_test_, {y0, y2}, {x}, &grad_outputs));
      ClientSession session(scope_test_);
      std::vector<Tensor> grad_result;
      TF_EXPECT_OK(session.Run({{x, {3.0f}}}, grad_outputs, &grad_result));
      EXPECT_EQ(grad_result.size(), 1);
      EXPECT_EQ(grad_result[0].NumElements(), 1);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Apr 15 15:13:38 UTC 2023
    - 25K bytes
    - Viewed (0)
  10. tensorflow/cc/gradients/image_grad_test.cc

        TensorShape x_shape({1, 2, 2, 1});
        Tensor x_data = MakeData<T>(x_shape);
        Output x, y;
        MakeOp<T>(op_type, x_data, {4, 6}, align_corners, half_pixel_centers, &x,
                  &y);
    
        ClientSession session(scope_);
        std::vector<Tensor> outputs;
        TF_ASSERT_OK(session.Run({y}, &outputs));
        EXPECT_EQ(outputs.size(), 1);
        EXPECT_EQ(outputs[0].shape(), TensorShape({1, 4, 6, 1}));
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 15 04:08:05 UTC 2019
    - 12.1K bytes
    - Viewed (0)
Back to top