Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 100 for num_elements (0.23 sec)

  1. android/guava/src/com/google/common/collect/Queues.java

        int added = 0;
        while (added < numElements) {
          // we could rely solely on #poll, but #drainTo might be more efficient when there are multiple
          // elements already available (e.g. LinkedBlockingQueue#drainTo locks only once)
          added += q.drainTo(buffer, numElements - added);
          if (added < numElements) { // not enough elements immediately available; will have to poll
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Apr 01 16:15:01 UTC 2024
    - 16K bytes
    - Viewed (0)
  2. tensorflow/c/tf_tensor.cc

    }
    
    #endif  // LIBTPU_EXCLUDE_C_API_IMPL
    
    namespace tensorflow {
    
    void TensorInterface::Release() {
      if (Type() == DT_STRING && NumElements() > 0) {
        TF_TString* data = static_cast<TF_TString*>(Data());
        if (CanMove() && data != nullptr) {
          for (int64_t i = 0; i < NumElements(); ++i) {
            TF_TString_Dealloc(&data[i]);
          }
        }
      }
      delete this;
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun Apr 14 21:57:32 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  3. tensorflow/c/experimental/saved_model/core/ops/restore_ops_test.cc

          "x/.ATTRIBUTES/VARIABLE_VALUE", DT_FLOAT, &x_handle));
      AbstractTensorPtr x = testing::TensorHandleToTensor(x_handle.get());
      EXPECT_EQ(x->Type(), DT_FLOAT);
      EXPECT_EQ(x->NumElements(), 1);
      EXPECT_EQ(x->NumDims(), 0);
      EXPECT_FLOAT_EQ(*reinterpret_cast<float*>(x->Data()), 1.0f);
    
      ImmediateTensorHandlePtr y_handle;
      TF_EXPECT_OK(internal::SingleRestore(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 14 19:16:58 UTC 2023
    - 4.2K bytes
    - Viewed (0)
  4. tensorflow/compiler/jit/xla_device_context.cc

                                                 Tensor* device_tensor,
                                                 StatusCallback done,
                                                 bool sync_dst_compute) const {
      if (cpu_tensor->NumElements() == 0) {
        VLOG(2) << "CopyCPUTensorToDevice empty tensor";
        done(absl::OkStatus());
        return;
      }
    
      VLOG(2) << "CopyCPUTensorToDevice " << this << " "
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 16 00:36:08 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  5. tensorflow/cc/framework/ops.cc

      size_t offset = 0;
      for (auto const& e : v) {
        Tensor elem = e.tensor;
        if (first.tensor.dtype() == DT_STRING) {
          for (int i = 0; i < elem.NumElements(); ++i) {
            t.flat<tstring>()(offset + i) = elem.flat<tstring>()(i);
          }
          offset += elem.NumElements();
        } else {
          std::copy_n(elem.tensor_data().data(), elem.TotalBytes(),
                      const_cast<char*>(t.tensor_data().data()) + offset);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Aug 11 01:20:50 UTC 2021
    - 3.5K bytes
    - Viewed (0)
  6. tensorflow/cc/framework/ops.h

          typedef typename RealType<T>::type RealT;
          Tensor t(DataTypeToEnum<RealT>::v(), shape);
          if (t.NumElements() != static_cast<int64_t>(v.size())) {
            status = absl::InvalidArgumentError(absl::StrCat(
                "Cannot construct a tensor with ", t.NumElements(),
                " from an initializer list with ", v.size(), " elements"));
            return;
          }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Apr 13 05:57:22 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  7. tensorflow/compiler/jit/node_matchers.cc

      if (actual.NumElements() != expected.NumElements()) {
        if (listener->IsInterested()) {
          *listener << "\nwas looking for tensor with " << expected.NumElements()
                    << " elements, found tensor with " << actual.NumElements()
                    << " elements";
          return false;
        }
      }
    
      for (int64_t i = 0, e = actual.NumElements(); i < e; i++) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Jun 03 16:15:20 UTC 2022
    - 16.8K bytes
    - Viewed (0)
  8. tensorflow/cc/ops/const_op.h

      if (!scope.ok()) return Output();
    
      typedef typename Input::Initializer::RealType<T>::type DstT;
    
      if (val.tensor.dtype() == DataTypeToEnum<DstT>::v()) {
        return orig_const_output;
      }
      if (val.tensor.NumElements() == 0) {
        Tensor t(DataTypeToEnum<DstT>::v(), val.tensor.shape());
        return Const(scope, Input::Initializer(t));
      }
    
      // TODO(keveman): Refactor Cast op's kernel implementation such that the code
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Sep 17 09:17:01 UTC 2020
    - 2.8K bytes
    - Viewed (0)
  9. tensorflow/compiler/jit/pjrt_device_context.cc

                                                  StatusCallback done) {
      tsl::profiler::TraceMe traceme("PjRtDeviceContext::CopyDeviceTensorToCPU");
      if (device_tensor->NumElements() == 0) {
        VLOG(2) << "CopyDeviceTensorToCPU empty tensor";
        done(absl::OkStatus());
        return;
      }
      auto literal = std::make_unique<xla::MutableBorrowingLiteral>();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Apr 13 08:49:31 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apimachinery/pkg/api/meta/meta_test.go

    	metav1beta1 "k8s.io/apimachinery/pkg/apis/meta/v1beta1"
    
    	"github.com/google/go-cmp/cmp"
    	fuzz "github.com/google/gofuzz"
    )
    
    func TestAsPartialObjectMetadata(t *testing.T) {
    	f := fuzz.New().NilChance(.5).NumElements(0, 1).RandSource(rand.NewSource(1))
    
    	for i := 0; i < 100; i++ {
    		m := &metav1.ObjectMeta{}
    		f.Fuzz(m)
    		partial := AsPartialObjectMetadata(m)
    		if !reflect.DeepEqual(&partial.ObjectMeta, m) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:48:03 UTC 2023
    - 1.5K bytes
    - Viewed (0)
Back to top