Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for We (0.17 sec)

  1. tensorflow/c/experimental/gradients/array_grad.cc

                     absl::Span<AbstractTensorHandle*> grad_inputs) override {
        for (int i = 0; i < grad_outputs.size(); i++) {
          auto grad_input = grad_outputs[i];
          // TODO(srbs): Should we add a copy contructor to AbstractTensorHandle
          // that takes care of this similar to `Tensor`?
          if (grad_input) {
            grad_input->Ref();
          }
          grad_inputs[i] = grad_input;
        }
    C++
    - Registered: Tue Apr 09 12:39:09 GMT 2024
    - Last Modified: Wed Feb 28 13:53:47 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  2. tensorflow/c/eager/gradient_checker.cc

      vector<AbstractTensorHandle*> theta_inputs(inputs.size());
      for (int i{}; i < inputs.size(); ++i) {
        theta_inputs[i] = inputs[i];
      }
    
      AbstractTensorHandle* theta =
          theta_inputs[input_index];  // parameter we are grad checking
    
      // Convert from AbstractTensor to TF_Tensor.
      TF_Tensor* theta_tensor;
      TF_RETURN_IF_ERROR(GetValue(theta, &theta_tensor));
    
      // Get number of elements and fill data.
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  3. tensorflow/c/experimental/filesystem/plugins/posix/copy_file_portable.cc

      std::unique_ptr<char[]> buffer(new char[kPosixCopyFileBufferSize]);
    
      off_t offset = 0;
      int bytes_transferred = 0;
      int rc = 1;
      // When `sendfile` returns 0 we stop copying and let callers handle this.
      while (offset < size && rc > 0) {
        size_t chunk = size - offset;
        if (chunk > kPosixCopyFileBufferSize) chunk = kPosixCopyFileBufferSize;
    
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Fri Nov 22 21:23:55 GMT 2019
    - 1.9K bytes
    - Viewed (0)
  4. tensorflow/c/experimental/gradients/nn_grad_test.cc

      // `gradient_checker` only works with model that returns only 1 tensor.
      // Although, `ops::SparseSoftmaxCrossEntropyWithLogits` returns 2 tensors, the
      // second tensor isn't needed for computing gradient so we could safely drop
      // it.
      outputs[0] = loss;
      backprop->Unref();
      return absl::OkStatus();
    }
    
    Status BiasAddModel(AbstractContext* ctx,
                        absl::Span<AbstractTensorHandle* const> inputs,
    C++
    - Registered: Tue Mar 26 12:39:09 GMT 2024
    - Last Modified: Wed Feb 28 13:53:47 GMT 2024
    - 8.3K bytes
    - Viewed (0)
  5. tensorflow/c/experimental/filesystem/plugins/gcs/expiring_lru_cache_test.cc

      EXPECT_TRUE(cache2.Lookup("d", &value));
      EXPECT_EQ(value, 4);
      EXPECT_TRUE(cache2.Lookup("e", &value));
      EXPECT_EQ(value, 5);
    }
    
    TEST(ExpiringLRUCacheTest, LookupOrCompute) {
      // max_age of 0 means we should always compute.
      uint64 num_compute_calls = 0;
      tf_gcs_filesystem::ExpiringLRUCache<int>::ComputeFunc compute_func =
          [&num_compute_calls](const string& key, int* value, TF_Status* status) {
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Jul 09 19:31:22 GMT 2020
    - 7.1K bytes
    - Viewed (0)
  6. tensorflow/c/experimental/gradients/array_grad_test.cc

    };
    
    TEST_P(CppGradients, TestIdentityNGrad) {
      // This test is interesting because the current implementation of GradientTape
      // would return [0, 1] whereas we use build_default_zeros_grads=false here
      // so we get back [nullptr, 1].
    
      AbstractTensorHandlePtr x1;
      {
        AbstractTensorHandle* x1_raw = nullptr;
        status_ = TestScalarTensorHandle<float, TF_FLOAT>(
    C++
    - Registered: Tue Mar 26 12:39:09 GMT 2024
    - Last Modified: Wed Feb 28 13:53:47 GMT 2024
    - 5K bytes
    - Viewed (0)
  7. tensorflow/c/eager/c_api_remote_function_test.cc

                                        /*remote_func_outputs=*/true);
    }
    TEST(CAPI, RemoteExecuteSilentCopiesLocalAsyncFuncOrdering) {
      // A remote input may be not ready when we start running a function. Test that
      // the function execution should wait until the remote input is ready.
      TestRemoteExecuteSilentCopiesFunc(/*async=*/true, /*remote=*/false,
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Fri Dec 11 22:56:03 GMT 2020
    - 3.6K bytes
    - Viewed (0)
  8. tensorflow/c/eager/unified_api_testutil.cc

        const char* fn_name = "test_fn";
        core::RefCountPtr<AbstractFunction> scoped_func;
        // Returning null tensors from a tf.function is not supported, so we keep
        // track of indices in the model's outputs are nullptr in this set.
        // The FunctionDef only outputs the non-null tensors. We later pad the
        // function op outputs to have nullptrs at the `null_indices`.
        absl::flat_hash_set<int> null_indices;
        {
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Feb 27 13:57:45 GMT 2024
    - 5.7K bytes
    - Viewed (0)
  9. tensorflow/c/experimental/filesystem/plugins/posix/copy_file_linux.cc

    //
    // This method uses `sendfile` specific to linux after 2.6.33.
    int CopyFileContents(int dst_fd, int src_fd, off_t size) {
      off_t offset = 0;
      int bytes_transferred = 0;
      int rc = 1;
      // When `sendfile` returns 0 we stop copying and let callers handle this.
      while (offset < size && rc > 0) {
        // Use uint64 for safe compare SSIZE_MAX
        uint64_t chunk = size - offset;
        if (chunk > SSIZE_MAX) chunk = SSIZE_MAX;
    
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Fri Nov 22 21:23:55 GMT 2019
    - 1.5K bytes
    - Viewed (0)
Back to top