Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 54 for Dtype (0.07 sec)

  1. tensorflow/compiler/jit/xla_device_ops.cc

      mutex_lock ml(*variable->mu());
      OP_REQUIRES(
          context,
          !variable->is_initialized || variable->tensor()->dtype() == dtype_,
          errors::InvalidArgument(
              "Trying to assign variable with wrong dtype. Expected ",
              DataTypeString(variable->tensor()->dtype()), " got ",
              DataTypeString(dtype_)));
      variable->is_initialized = true;
      *variable->tensor() = value;
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 22 08:47:20 UTC 2024
    - 3K bytes
    - Viewed (0)
  2. tensorflow/compiler/jit/device_compilation_cluster_signature.cc

    // Functor that compares the arg values of two different signatures. Returns
    // true when the args are not equal.
    struct SignatureNotEqual {
      bool operator()(const Tensor& arg, const Tensor& other) {
        return arg.dtype() != other.dtype() || arg.shape() != other.shape() ||
               arg.tensor_data() != other.tensor_data();
      }
      bool operator()(const TensorTypeAndShape& arg,
                      const TensorTypeAndShape& other) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 22 06:59:07 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  3. tensorflow/compiler/jit/tests/device_compiler_test_helper.cc

      *graph.add_node() = MakeNode("a", "Placeholder", {},
                                   {{"dtype", DT_FLOAT}, {"shape", input_shape}});
      *graph.add_node() = MakeNode("b", "Placeholder", {},
                                   {{"dtype", DT_FLOAT}, {"shape", input_shape}});
      *graph.add_node() = MakeNode("c", "Placeholder", {},
                                   {{"dtype", DT_FLOAT}, {"shape", input_shape}});
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Feb 09 08:24:16 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/utils/mangling_util.cc

    }
    
    Status DemangleTensor(absl::string_view str, TensorProto* proto) {
      return ParseTextProto(str, kTensorPrefix, proto);
    }
    
    string MangleDataType(const DataType& dtype) {
      return absl::StrCat(kDataTypePrefix, DataType_Name(dtype));
    }
    
    Status DemangleDataType(absl::string_view str, DataType* proto) {
      absl::string_view pbtxt;
      TF_RETURN_IF_ERROR(ConsumePrefix(str, kDataTypePrefix, &pbtxt));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Feb 26 03:47:51 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  5. tensorflow/c/experimental/saved_model/core/test_utils.cc

      switch (dtype) {
    #define CASE(type)                                       \
      case DataTypeToEnum<type>::value: {                    \
        type* typed_a = static_cast<type*>(a);               \
        type* typed_b = static_cast<type*>(b);               \
        for (int64_t i = 0; i < num_elements; ++i) {         \
          if (DataTypeIsFloating(dtype)) {                   \
            EXPECT_FLOAT_EQ(static_cast<float>(typed_a[i]),  \
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Sep 08 20:13:32 UTC 2023
    - 5.8K bytes
    - Viewed (0)
  6. tensorflow/compiler/jit/pjrt_tensor_buffer_util.cc

    #include "tsl/platform/statusor.h"
    
    namespace tensorflow {
    
    static size_t GetTensorSize(const TensorShape& shape, const DataType dtype) {
      return shape.num_elements() * DataTypeSize(dtype);
    }
    
    absl::StatusOr<Tensor> MakeTensorFromPjRtBuffer(
        const DataType dtype, const TensorShape& shape,
        std::unique_ptr<xla::PjRtBuffer> pjrt_buffer) {
      TF_ASSIGN_OR_RETURN(std::unique_ptr<xla::PjRtBuffer::ExternalReference> ref,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Sep 14 18:14:47 UTC 2023
    - 3.5K bytes
    - Viewed (0)
  7. tensorflow/c/checkpoint_reader.cc

      Status status;
      if (reader_ != nullptr) {
        status = reader_->GetTensor(name, out_tensor);
      } else {
        tensorflow::DataType dtype;
        tensorflow::TensorShape shape;
        status = v2_reader_->LookupDtypeAndShape(name, &dtype, &shape);
        if (status.ok()) {
          out_tensor->reset(new Tensor(dtype, shape));
          status = v2_reader_->Lookup(name, out_tensor->get());
          if (!status.ok()) out_tensor->reset();
        }
      }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Aug 25 21:29:12 UTC 2023
    - 5.5K bytes
    - Viewed (0)
  8. tensorflow/c/kernels/bitcast_op_test.cc

      def.set_device(DEVICE_CPU);
    
      AttrValue typeAttr;
      SetAttrValue(input_tensor->dtype(), &typeAttr);
    
      AttrValue outTypeAttr;
      SetAttrValue(out_type, &outTypeAttr);
    
      (*def.mutable_attr())["T"] = typeAttr;
      (*def.mutable_attr())["type"] = outTypeAttr;
    
      def.add_input(
          strings::StrCat("input1: ", DataTypeString(input_tensor->dtype())));
    
      std::unique_ptr<OpKernel> kernel =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Jul 18 15:10:51 UTC 2022
    - 5.5K bytes
    - Viewed (0)
  9. 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)
  10. tensorflow/cc/experimental/libtf/runtime/runtime.cc

                    .values();
            for (const StructuredValue& arg : args) {
              PartialTensorShape shape = arg.tensor_spec_value().shape();
              DataType dtype = arg.tensor_spec_value().dtype();
              TaggedValue tensor_spec(shape, dtype);
              input_signature.tuple().emplace_back(tensor_spec);
            }
    
            // Setup output signature.
            TensorSpecProto output_tensor_spec_proto =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Sep 01 11:18:25 UTC 2022
    - 7.4K bytes
    - Viewed (0)
Back to top