Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 34 for DT_STRING (0.13 sec)

  1. tensorflow/cc/ops/const_op_test.cc

      ExpectNodeEqual<double>(c.node(), {42.0, 42.0, 42.0, 42.0}, {2, 2});
    
      auto d = ops::Const(root, {"1", "2", "3", "4", "5", "6"}, {2, 3});
      TF_CHECK_OK(root.status());
      EXPECT_EQ(d.op().output_type(0), DT_STRING);
      ExpectNodeEqual<tstring>(d.node(), {"1", "2", "3", "4", "5", "6"}, {2, 3});
    }
    
    TEST(ConstOpTest, FromProto) {
      Scope root = Scope::NewRootScope();
      TensorProto proto;
      proto.set_dtype(DT_DOUBLE);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Aug 12 14:38:21 UTC 2019
    - 4.9K bytes
    - Viewed (0)
  2. tensorflow/cc/framework/cc_ops_test.cc

      EXPECT_FALSE(root.status().ok());
    }
    
    TEST(CCOpTest, InvalidFinalize) {
      Scope root = Scope::NewRootScope();
      auto read_up_to =
          ops::ReaderReadUpTo(root, Variable(root, {}, DT_STRING),
                              Variable(root, {}, DT_STRING), static_cast<int32>(2));
      EXPECT_FALSE(root.status().ok());
      auto err_msg = std::string(root.status().message());
      EXPECT_NE(err_msg.find("'num_records' passed int32 expected int64"),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Apr 15 15:13:38 UTC 2023
    - 8.7K bytes
    - Viewed (0)
  3. tensorflow/compiler/jit/extract_outside_compilation_pass.cc

      // Add a _Retval node to loop body.
      NodeDefBuilder ret_builder(
          absl::StrCat("recv_oc_while_body_ret_", while_node_name), "_Retval");
      ret_builder.Attr("T", DT_STRING);
      ret_builder.Attr("index", 0);
      ret_builder.Input(key_arg->name(), 0, DT_STRING);
      NodeDef ret_def;
      TF_RETURN_IF_ERROR(ret_builder.Finalize(&ret_def));
      TF_ASSIGN_OR_RETURN(Node * ret_node, body_graph->AddNode(ret_def));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 12 06:33:33 UTC 2024
    - 104.7K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/utils/convert_tensor.cc

        case DT_BFLOAT16:
        case DT_HALF:
        case DT_FLOAT8_E5M2:
        case DT_FLOAT8_E4M3FN:
          return ConvertTensorOfCustomFloatType(input_tensor, type);
        case DT_STRING:
          return ConvertStringTensor(input_tensor, type);
        default:
          // TODO(hinsu): Remove mangling now that there is a special attribute.
          return ElementsAttr(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 26 09:37:10 UTC 2024
    - 20.5K bytes
    - Viewed (0)
  5. tensorflow/c/experimental/saved_model/core/ops/restore_ops.cc

                                          const std::string& s,
                                          ImmediateTensorHandlePtr* out) {
      int64_t flat_shape[] = {1};
      AbstractTensorPtr tensor(ctx->CreateTensor(DT_STRING, flat_shape));
      if (tensor.get() == nullptr) {
        return errors::Internal(
            "Failed to create vector string tensor for checkpoint restore");
      }
      // Use placement new to construct the string, since we don't have
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Aug 11 01:20:50 UTC 2021
    - 4.5K bytes
    - Viewed (0)
  6. tensorflow/cc/framework/ops.cc

      Tensor t(first.tensor.dtype(), shape);
    
      // Collate the constituent Tensors.
      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 {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Aug 11 01:20:50 UTC 2021
    - 3.5K bytes
    - Viewed (0)
  7. tensorflow/cc/saved_model/loader.cc

          TF_RETURN_IF_ERROR(ValidateFunctionNotRecursive(function));
        }
      }
    
      return absl::OkStatus();
    }
    
    Tensor CreateStringTensor(const string& value) {
      Tensor tensor(DT_STRING, TensorShape({}));
      tensor.scalar<tstring>()() = value;
      return tensor;
    }
    
    void AddAssetsTensorsToInputs(const StringPiece export_dir,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 02 04:36:00 UTC 2024
    - 23K bytes
    - Viewed (0)
  8. tensorflow/cc/saved_model/testdata/chunked_saved_model/chunked_model/saved_model.pbtxt

          }
          op {
            name: "RestoreV2"
            input_arg {
              name: "prefix"
              type: DT_STRING
            }
            input_arg {
              name: "tensor_names"
              type: DT_STRING
            }
            input_arg {
              name: "shape_and_slices"
              type: DT_STRING
            }
            output_arg {
              name: "tensors"
              type_list_attr: "dtypes"
            }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 08 21:43:11 UTC 2023
    - 531.2K bytes
    - Viewed (0)
  9. tensorflow/cc/saved_model/bundle_v2.cc

      TF_RETURN_WITH_CONTEXT_IF_ERROR(
          bundle_reader->Lookup(kObjectGraphProtoKey, &object_graph_tensor),
          "SavedModel checkpoint does not contain object graph.");
      if (object_graph_tensor.dtype() != DT_STRING ||
          object_graph_tensor.dims() != 0 ||
          object_graph_tensor.NumElements() != 1) {
        return absl::Status(
            absl::StatusCode::kFailedPrecondition,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Dec 05 18:28:37 UTC 2023
    - 9.1K bytes
    - Viewed (0)
  10. tensorflow/c/tf_tensor.cc

      tsl::Set_TF_Status_from_Status(status, cc_status);
    }
    
    #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]);
          }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun Apr 14 21:57:32 UTC 2024
    - 11.5K bytes
    - Viewed (0)
Back to top