Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 21 for Dtype (0.04 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/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)
  3. 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)
  4. 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)
  5. tensorflow/compiler/mlir/lite/stablehlo/transforms/op_stat_pass.cc

            auto operand_or_result = value_shaped_type.getElementType();
            std::string dtype;
    
            TypeSwitch<Type>(operand_or_result)
                .Case<IntegerType>([&](Type) {
                  dtype =
                      absl::StrCat("i", operand_or_result.getIntOrFloatBitWidth());
                })
                .Case<FloatType>([&](Type) {
                  dtype =
                      absl::StrCat("f", operand_or_result.getIntOrFloatBitWidth());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  6. tensorflow/c/experimental/saved_model/core/ops/variable_ops.cc

                                               DataType dtype, TensorShape shape,
                                               const char* raw_device_name,
                                               ImmediateTensorHandlePtr* handle) {
      ImmediateOpPtr varhandle_op(ctx->CreateOperation());
    
      TF_RETURN_IF_ERROR(varhandle_op->Reset("VarHandleOp", raw_device_name));
      TF_RETURN_IF_ERROR(varhandle_op->SetAttrType("dtype", dtype));
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 23 11:28:19 UTC 2024
    - 5K bytes
    - Viewed (0)
  7. tensorflow/cc/experimental/libtf/impl/iostream_test.cc

    }
    
    TEST(OStreamTest, TestTensorSpec) {
      std::stringstream stream;
      TensorSpec tensor_spec;
      tensor_spec.shape = tensorflow::PartialTensorShape({2});
      tensor_spec.dtype = tensorflow::DT_FLOAT;
      stream << tensor_spec;
      ASSERT_EQ(stream.str(), "TensorSpec(shape = [2], dtype = 1)");
    }
    
    }  // namespace impl
    }  // namespace libtf
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 18 09:47:46 UTC 2024
    - 2K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tf2xla/internal/utils/test_metadata_config.cc

            xla_shape.dimensions(), &tensor_shape));
        arg_shapes.emplace_back(tensor_shape);
    
        DataType dtype;
        TF_RETURN_IF_ERROR(ConvertToDataType(input_type, &dtype));
    
        auto metadata_arg = metadata_proto.add_args();
        metadata_arg->set_kind(tpu::TPUCompileMetadataProto::Arg::PARAMETER);
        metadata_arg->set_dtype(dtype);
      }
    
      return absl::OkStatus();
    }
    
    absl::Status SetupReturnValues(mlir::ModuleOp module,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 13 23:59:33 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  9. tensorflow/c/eager/c_api_unified_experimental.cc

      TF_DeleteExecutionContext(ctx);
      return wrap(func);
    }
    
    TF_AbstractTensor* TF_AddFunctionParameter(TF_ExecutionContext* func,
                                               TF_DataType dtype, TF_Shape shape,
                                               TF_Status* s) {
      DCHECK_GE(shape.num_dims, -1);
      TracingTensorHandle* t;
      TracingContext* tracing_ctx = dyn_cast<TracingContext>(unwrap(func));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 09 10:15:17 UTC 2024
    - 9K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tfrt/saved_model/saved_model.cc

    absl::StatusOr<std::pair<tensorflow::DataType, tensorflow::PartialTensorShape>>
    ProcessTensorSpec(mlir::TensorType type) {
      tensorflow::DataType dtype;
      TF_RETURN_IF_ERROR(
          ConvertScalarTypeToDataType(type.getElementType(), &dtype));
    
      if (!type.hasRank())
        return std::make_pair(dtype, tensorflow::PartialTensorShape());
    
      auto shape = type.getShape();
      llvm::SmallVector<int64_t, 4> dims;
      dims.assign(shape.begin(), shape.end());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.9K bytes
    - Viewed (0)
Back to top