Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for zeros (0.34 sec)

  1. 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)
  2. tensorflow/c/eager/gradients.h

    // allow us to trace the data dependencies between operations and hence compute
    // gradients.
    //
    // `ZerosLike` is not expected to be called and returns a nullptr. The creation
    // of default zeros grads is handled by the `DefaultGradientFunction` registered
    // for each op.
    // TODO(srbs): We need to define `ZerosLike` here to keep the compiler happy.
    // Figure out a way to avoid this.
    C
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Mon Sep 26 10:27:05 GMT 2022
    - 6.9K bytes
    - Viewed (0)
  3. tensorflow/c/eager/tape.h

        return absl::OkStatus();
      }
    
      // We may need to allocate zero inputs for trainable dtypes we don't have JVPs
      // for. Make sure they get cleaned up.
      std::vector<Gradient*> new_zeros;
      auto delete_new_zeros = gtl::MakeCleanup([&new_zeros, this] {
        for (Gradient* tensor : new_zeros) {
          this->vspace_.DeleteGradient(tensor);
        }
      });
      std::vector<Gradient*> in_grads;
    C
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Tue Apr 02 12:40:29 GMT 2024
    - 47.2K bytes
    - Viewed (1)
  4. tensorflow/c/eager/gradients.cc

        }
      }
    
      TF_RETURN_IF_ERROR(GradientTape::ComputeGradient(
          vspace, target_tensor_ids, source_tensor_ids, sources_that_are_targets,
          output_gradients, result, /*build_default_zeros_grads*/ false));
      return absl::OkStatus();
    }
    
    // Helper functions which delegate to `AbstractOperation`, update
    // the state of the ForwardOperation and call the tape as appropriate.
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 19.3K bytes
    - Viewed (0)
  5. RELEASE.md

    SyncReplicasOptimizer is removed and SyncReplicasOptimizerV2 renamed to
    SyncReplicasOptimizer. * `tf.zeros_initializer()` and `tf.ones_initializer()`
    now return a callable that must be called with initializer arguments, in your
    code replace `tf.zeros_initializer` with `tf.zeros_initializer()`. *
    `SparseTensor.shape` has been renamed to `SparseTensor.dense_shape`. Same for
    Plain Text
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Wed Apr 03 20:27:38 GMT 2024
    - 727.4K bytes
    - Viewed (8)
  6. tensorflow/c/c_api_function_test.cc

                  {"add2:sum:0", "final_out"}},
                 {});
    }
    
    TEST_F(CApiFunctionTest, ImportFunctionDef_InvalidProto) {
      // Invalid protobuf data (protos cannot start with 4 bytes of zeros)
      char proto[] = {0x0, 0x0, 0x0, 0x0};
      func_ = TF_FunctionImportFunctionDef(proto, 4, s_);
      EXPECT_TRUE(func_ == nullptr);
      EXPECT_EQ(TF_INVALID_ARGUMENT, TF_GetCode(s_));
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Jul 20 22:08:54 GMT 2023
    - 63.6K bytes
    - Viewed (6)
  7. tensorflow/c/c_test_util.cc

                      const char* name, TF_Operation** op) {
      TF_Operation* zero = ScalarConst(
          0, graph, s, ::tensorflow::strings::StrCat(name, "_const0").c_str());
      TF_OperationDescription* desc = TF_NewOperation(graph, "Split", name);
      TF_AddInput(desc, {zero, 0});
      TF_AddInput(desc, {input, 0});
      TF_SetAttrInt(desc, "num_split", 3);
      TF_SetAttrType(desc, "T", TF_INT32);
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Fri Oct 15 03:16:52 GMT 2021
    - 17.8K bytes
    - Viewed (2)
  8. tensorflow/c/eager/dlpack.cc

      void* data = dl_tensor->data;
    
      if (dl_tensor->byte_offset != 0) {
        status->status = tensorflow::errors::InvalidArgument(
            "Unsupported byte_offset (", dl_tensor->byte_offset,
            ") from DLPack, must be zero");
        return nullptr;
      }
    
      size_t total_bytes = dl_tensor->dtype.bits / 8;
      for (int i = 0; i < num_dims; i++) {
        total_bytes *= dims[i];
      }
    
      if (dl_tensor->strides != nullptr &&
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 12.8K bytes
    - Viewed (0)
  9. tensorflow/c/eager/unified_api_testutil.h

                                 absl::Span<AbstractTensorHandle* const> inputs,
                                 std::vector<AbstractTensorHandle*>* params);
    
    // A callable that takes tensor inputs and returns zero or more tensor outputs.
    using Model = std::function<Status(AbstractContext*,
                                       absl::Span<AbstractTensorHandle* const>,
                                       absl::Span<AbstractTensorHandle*>)>;
    
    C
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Tue Feb 27 13:57:45 GMT 2024
    - 4K bytes
    - Viewed (0)
  10. tensorflow/c/experimental/filesystem/plugins/gcs/ram_file_block_cache_test.cc

        EXPECT_EQ(got_n, want_n);
        calls++;
        memset(buffer, 'x', got_n);
        TF_SetStatus(status, TF_OK, "");
        return got_n;
      };
      // If block_size, max_bytes, or both are zero, or want_n is larger than
      // max_bytes the cache is a pass-through.
      tf_gcs_filesystem::RamFileBlockCache cache1(1, 0, 0, fetcher);
      tf_gcs_filesystem::RamFileBlockCache cache2(0, 1, 0, fetcher);
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Fri Oct 15 03:16:57 GMT 2021
    - 23.2K bytes
    - Viewed (0)
Back to top