Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 149 for Dtype (0.03 sec)

  1. tensorflow/cc/experimental/base/tests/tensorhandle_test.cc

      ASSERT_TRUE(status.ok()) << status.message();
    
      TF_DataType dtype = TypeParam::kDType;
      // This is our 1D tensor of varying dtype.
      std::vector<typename TypeParam::type> value = {42, 100, 0, 1, 4, 29};
      // Shape is Rank 2 vector with shape 2 x 3.
      std::vector<int64_t> shape({2, 3});
    
      Tensor original_tensor = Tensor::FromBuffer(
          /*dtype=*/dtype, /*shape=*/shape,
          /*data=*/value.data(),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Apr 13 09:56:08 UTC 2024
    - 6.9K bytes
    - Viewed (0)
  2. tensorflow/c/eager/dlpack.cc

      owner->reference.Unref();
      delete owner;
    }
    
    // Converts TF_DATAType to DLPack data type.
    DLDataType GetDlDataType(TF_DataType data_type, TF_Status* status) {
      DLDataType dtype;
      dtype.lanes = 1;
      dtype.bits = TF_DataTypeSize(data_type) * 8;
      switch (data_type) {
        case TF_DataType::TF_BOOL:
          dtype.code = DLDataTypeCode::kDLBool;
          break;
        case TF_DataType::TF_HALF:
        case TF_DataType::TF_FLOAT:
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 15 09:49:45 UTC 2024
    - 12.8K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/utils/convert_type.cc

        switch (itype.getWidth()) {
          case 1:
            *dtype = DT_BOOL;
            return absl::OkStatus();
          case 4:
            *dtype = itype.isUnsigned() ? DT_UINT4 : DT_INT4;
            return absl::OkStatus();
          case 8:
            *dtype = itype.isUnsigned() ? DT_UINT8 : DT_INT8;
            return absl::OkStatus();
          case 16:
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 26 09:37:10 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  4. tensorflow/c/tf_tensor.cc

      return CreateTensor(buf, dtype, dims, num_dims, len);
    }
    
    TF_Tensor* TF_NewTensor(TF_DataType dtype, const int64_t* dims, int num_dims,
                            void* data, size_t len,
                            void (*deallocator)(void* data, size_t len, void* arg),
                            void* deallocator_arg) {
      TF_ManagedBuffer* buf = nullptr;
      if (dtype != TF_STRING && dtype != TF_RESOURCE &&
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun Apr 14 21:57:32 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  5. tensorflow/c/eager/dlpack_test.cc

      EXPECT_EQ(dltensor_out->device.device_id, dltensor_in->device.device_id);
      EXPECT_EQ(dltensor_out->ndim, dltensor_in->ndim);
      EXPECT_EQ(dltensor_out->dtype.code, dltensor_in->dtype.code);
      EXPECT_EQ(dltensor_out->dtype.bits, dltensor_in->dtype.bits);
      EXPECT_EQ(dltensor_out->dtype.lanes, dltensor_in->dtype.lanes);
      for (int i = 0; i < dltensor_in->ndim; ++i) {
        EXPECT_EQ(dltensor_out->shape[i], dltensor_in->shape[i]);
        if (dltensor_out->strides) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Jun 30 03:04:46 UTC 2023
    - 4.4K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/tensorflow/cc/const_op_size.cc

    }
    
    // Arbitrarily calculate the size of const of type whose size is unkown or
    // varying. Each element of such a type is considered to have
    // `kAssumedNumBytesPerElem` bytes.
    int64_t GetSizeOfUnsupportedTypeConst(TF::ConstOp const_op) {
      return kAssumedNumBytesPerElem * const_op.getValue().getNumElements();
    }
    
    }  // namespace
    
    int64_t GetSizeInBytes(TF::ConstOp const_op) {
      const Type dtype = const_op.getDtype();
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Dec 14 04:37:13 UTC 2022
    - 2.7K bytes
    - Viewed (0)
  7. tensorflow/c/experimental/ops/resource_variable_ops.cc

                          const char* name, const char* raw_device_name) {
      AbstractOperationPtr op_ptr(ctx->CreateOperation());
      TF_RETURN_IF_ERROR(op_ptr->Reset("ReadVariableOp", raw_device_name));
      TF_RETURN_IF_ERROR(MaybeSetOpName(op_ptr.get(), name));
      TF_RETURN_IF_ERROR(op_ptr->AddInput(resource));
      TF_RETURN_IF_ERROR(op_ptr->SetAttrType("dtype", dtype));
      int num_retvals = 1;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 10 19:11:36 UTC 2022
    - 5.1K bytes
    - Viewed (0)
  8. tensorflow/cc/experimental/libtf/impl/tensor_spec_test.cc

      tensorflow::PartialTensorShape unknown_shape;
      TensorSpec ts1;
      ts1.shape = unknown_shape;
      ts1.dtype = tensorflow::DT_FLOAT;
    
      TensorSpec ts2;
      ts2.shape = tensorflow::PartialTensorShape({2});
      ts2.dtype = tensorflow::DT_FLOAT;
    
      TensorSpec ts3;
      ts3.shape = tensorflow::PartialTensorShape({1, 2});
      ts3.dtype = tensorflow::DT_FLOAT;
    
      EXPECT_TRUE(absl::VerifyTypeImplementsAbslHashCorrectly({ts1, ts2, ts3}));
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 18 09:47:46 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  9. tensorflow/cc/experimental/base/tests/tensor_test.cc

      Tensor tensor = Tensor::FromBuffer(
          /*dtype=*/dtype, /*shape=*/shape,
          /*data=*/value.data(),
          /*len=*/value.size() * sizeof(typename TypeParam::type),
          /*deleter=*/[](void*, size_t) {}, &status);
      ASSERT_TRUE(status.ok()) << status.message();
    
      EXPECT_EQ(tensor.dims(), 1);
      EXPECT_EQ(tensor.dtype(), dtype);
      absl::Span<const typename TypeParam::type> tensor_view(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Apr 13 09:56:08 UTC 2024
    - 6K bytes
    - Viewed (0)
  10. tensorflow/c/c_test_util.cc

    void PlaceholderHelper(TF_Graph* graph, TF_Status* s, const char* name,
                           TF_DataType dtype, const std::vector<int64_t>& dims,
                           TF_Operation** op) {
      TF_OperationDescription* desc = TF_NewOperation(graph, "Placeholder", name);
      TF_SetAttrType(desc, "dtype", dtype);
      if (!dims.empty()) {
        TF_SetAttrShape(desc, "shape", dims.data(), dims.size());
      }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Oct 15 03:16:52 UTC 2021
    - 17.8K bytes
    - Viewed (0)
Back to top