Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 34 for DT_STRING (0.1 sec)

  1. tensorflow/compiler/mlir/tensorflow/utils/convert_tensor_test.cc

    }
    
    TEST(ConvertTypeToTensorTypeTest, ConvertStringTensor) {
      mlir::MLIRContext context;
      RegisterDialects(context);
      mlir::Builder b(&context);
    
      // Create the sample tensor to convert.
      Tensor tensor(DT_STRING, TensorShape({1, 2, 2, 1}));
      EXPECT_EQ(4, tensor.NumElements());
      auto Tt = tensor.flat<tstring>();
      Tt.setValues({"one", "two", "three", "four"});
      auto value_or_status = ConvertTensor(tensor, &b);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  2. tensorflow/compiler/jit/compilability_check_util.cc

      if (node.type_string() == "Const") {
        const AttrValue* attr = node.attrs().Find("dtype");
        if (!op_filter_.allow_string_consts && attr != nullptr &&
            attr->type() == DT_STRING) {
          *uncompilable_reason =
              "Const op with type DT_STRING is not supported by XLA.";
          return false;
        }
      }
    
      // XLA does not offer guaranteed aliasing between the input and output of the
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 12 06:33:33 UTC 2024
    - 30.3K bytes
    - Viewed (0)
  3. tensorflow/compiler/jit/kernels/xla_ops.cc

      // Async compilation returns nullptr executable without an error.
      if (!executable && !pjrt_executable) {
        DCHECK(!must_compile_);
        Tensor compilation_key(cpu_allocator, DT_STRING, TensorShape({}));
        Tensor compilation_successful(cpu_allocator, DT_BOOL, TensorShape({}));
        compilation_successful.scalar<bool>()() = false;
        ctx->set_output(0, compilation_key);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 22:46:36 UTC 2024
    - 41.4K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/python/tf_tfl_flatbuffer_helpers.cc

          return DT_INT64;
        case toco::IODataType::UINT8:
          return DT_UINT8;
        case toco::IODataType::UINT64:
          return DT_UINT64;
        case toco::IODataType::STRING:
          return DT_STRING;
        case toco::IODataType::BOOL:
          return DT_BOOL;
        case toco::IODataType::COMPLEX64:
          return DT_COMPLEX64;
        case toco::IODataType::COMPLEX128:
          return DT_COMPLEX128;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun May 12 12:39:37 UTC 2024
    - 17.3K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/host_runtime/tpu_variable_runtime_reformatting.cc

      // Build a constant default key to specify that the unformatting should
      // transform the variables to the original format.
      builder.setInsertionPointAfter(while_op);
      tensorflow::Tensor default_key_tensor(tensorflow::DT_STRING, {3});
      default_key_tensor.vec<tensorflow::tstring>()(0) = kDefaultShardingValue;
      default_key_tensor.vec<tensorflow::tstring>()(1) = kDefaultShardingValue;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 21.9K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/utils/tf_xla_mlir_translate.cc

                                         data_type.value());
        const auto& resolved_dtype = data_types[data_type.index()];
        if (resolved_dtype == DT_INVALID || resolved_dtype == DT_STRING ||
            resolved_dtype == DT_RESOURCE || resolved_dtype == DT_VARIANT ||
            IsRefType(resolved_dtype))
          return errors::InvalidArgument("Unsupported dtype at index ",
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 18.8K bytes
    - Viewed (0)
  7. tensorflow/c/c_api_test.cc

      Status status;
      for (const std::vector<int64_t>& dims :
           std::vector<std::vector<int64_t>>{{n}, {1, n}, {n, 1}, {n / 2, 2}}) {
        // Create C++ Tensor
        Tensor src(tensorflow::DT_STRING, TensorShape(dims));
        for (int64_t i = 0; i < src.NumElements(); ++i) {
          src.flat<tstring>()(i) = data[i];
        }
        TF_Tensor* dst = TF_TensorFromTensor(src, &status);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 15 03:35:10 UTC 2024
    - 96.9K bytes
    - Viewed (0)
  8. tensorflow/cc/framework/cc_op_gen_util.cc

        case DT_INT64:
          return PrintArray(num_elts, t.flat<int64_t>().data());
        case DT_BOOL:
          return PrintArray(num_elts, t.flat<bool>().data());
        case DT_STRING: {
          string ret;
          for (int64_t i = 0; i < num_elts; ++i) {
            if (i > 0) strings::StrAppend(&ret, " ");
            strings::StrAppend(&ret, absl::CEscape(t.flat<tstring>()(i)));
          }
          return ret;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Feb 26 00:57:05 UTC 2024
    - 25K bytes
    - Viewed (0)
  9. tensorflow/compiler/jit/mark_for_compilation_pass_test.cc

        Node* a = ops::SourceOp(
            "Const", builder.opts()
                         .WithName("A")
                         .WithAttr("dtype", DT_STRING)
                         .WithAttr("value", Tensor(DT_STRING, TensorShape())));
        Node* b = ops::UnaryOp("EncodeBase64", a, builder.opts().WithName("B"));
        ops::BinaryOp("StringSplit", a, b, builder.opts().WithName("C"));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Feb 14 10:11:10 UTC 2024
    - 79.6K bytes
    - Viewed (0)
  10. tensorflow/compiler/jit/encapsulate_subgraphs_pass_test.cc

                     const GraphDefBuilder::Options& opts) {
      return KnownShapeBase(DT_FLOAT, shape, opts);
    }
    
    Node* KeyPlaceholderShape(const GraphDefBuilder::Options& opts) {
      return KnownShapeBase(DT_STRING, {2}, opts);
    }
    
    Node* KeyPlaceholder(const string& call_node,
                         const GraphDefBuilder::Options& opts) {
      if (opts.HaveError()) return nullptr;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 22 08:47:20 UTC 2024
    - 113.3K bytes
    - Viewed (0)
Back to top