Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 56 of 56 for init (0.18 sec)

  1. tensorflow/c/eager/c_api_experimental.cc

    }
    
    TF_Tensor* TFE_AllocateHostTensor(TFE_Context* ctx, TF_DataType dtype,
                                      const int64_t* dims, int num_dims,
                                      TF_Status* status) {
      std::vector<int64_t> dimvec(num_dims);
      for (int i = 0; i < num_dims; ++i) {
        dimvec[i] = static_cast<int64_t>(dims[i]);
      }
    
      if (ctx == nullptr) {
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Apr 11 23:52:39 GMT 2024
    - 35.9K bytes
    - Viewed (3)
  2. tensorflow/c/eager/gradient_checker_test.cc

    namespace internal {
    namespace {
    
    using tensorflow::TF_StatusPtr;
    
    void CompareNumericalAndManualGradients(
        Model model, AbstractContext* ctx,
        absl::Span<AbstractTensorHandle* const> inputs, int input_index,
        float* expected_grad, int num_grad, bool use_function,
        double abs_error = 1e-2) {
      Status s;
      AbstractTensorHandlePtr numerical_grad;
      {
        AbstractTensorHandle* numerical_grad_raw;
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Fri Apr 14 10:03:59 GMT 2023
    - 6.5K bytes
    - Viewed (0)
  3. tensorflow/c/eager/c_api_remote_test_util.cc

      std::vector<TFE_TensorHandle*> handles_task0;
      if (heavy_load_on_streaming_rpc) {
        // Send 50 tensor copy requests to simulate that there have been some RPC
        // requests been enqueued.
        for (int i = 0; i < 50; ++i) {
          handles_task0.push_back(TestMatrixTensorHandle(ctx));
        }
      }
      const char task1_name[] = "/job:localhost/replica:0/task:1/device:CPU:0";
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Fri Dec 11 22:56:03 GMT 2020
    - 9.1K bytes
    - Viewed (0)
  4. tensorflow/c/c_api_experimental_test.cc

    TEST(CAPI_EXPERIMENTAL, IsStateful) {
      std::unique_ptr<TF_Status, decltype(&TF_DeleteStatus)> status(
          TF_NewStatus(), TF_DeleteStatus);
      int assign = TF_OpIsStateful("AssignAddVariableOp", status.get());
      ASSERT_EQ(TF_OK, TF_GetCode(status.get())) << TF_Message(status.get());
      EXPECT_EQ(assign, 1);
      int id = TF_OpIsStateful("Identity", status.get());
      ASSERT_EQ(TF_OK, TF_GetCode(status.get())) << TF_Message(status.get());
      EXPECT_EQ(id, 0);
    }
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Jan 17 22:27:52 GMT 2023
    - 13.1K bytes
    - Viewed (1)
  5. tensorflow/c/c_api_function_test.cc

        for (int i = 0; i < expected.size(); ++i) {
          ASSERT_EQ(expected[i], data[i]) << "Different data at index " << i;
        }
      }
    
      std::vector<TF_Output> ToOutput(const std::vector<TF_Operation*> ops) {
        std::vector<TF_Output> out;
        for (auto op : ops) {
          out.push_back({op, 0});
        }
        return out;
      }
    
      void Define(int num_opers, const std::vector<TF_Operation*>& opers,
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Jul 20 22:08:54 GMT 2023
    - 63.6K bytes
    - Viewed (6)
  6. tensorflow/c/eager/unified_api_test.cc

      TF_RETURN_IF_ERROR(inputs[0]->Shape(&shape));
      if (shape.dims() != 2) {
        return errors::InvalidArgument(
            "Tensor expected to have rank 2 found rank: ", shape.dims());
      }
      int64_t dim_sizes[] = {2, 4};
      for (int i = 0; i < shape.dims(); i++) {
        if (shape.dim_size(i) != dim_sizes[i]) {
          return errors::InvalidArgument("Dim ", i, " expected to be of size ",
                                         dim_sizes[i],
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Feb 27 13:57:45 GMT 2024
    - 6.7K bytes
    - Viewed (0)
Back to top