Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for ConvertToTensorProto (0.13 sec)

  1. tensorflow/compiler/mlir/quantization/tensorflow/cc/const_op_size.cc

      return bytes_per_elem * const_value.getNumElements();
    }
    
    int64_t GetSizeOfStringConst(TF::ConstOp const_op) {
      const ElementsAttr const_value = const_op.getValue();
    
      // This cast is guaranteed to succeed. See `ConvertToTensorProto` from
      // tensorflow/core/ir/importexport/convert_tensor.cc.
      const auto str_attr = cast<DenseStringElementsAttr>(const_value);
    
      // Sum the sizes of each string.
      return absl::c_accumulate(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Dec 14 04:37:13 UTC 2022
    - 2.7K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/utils/convert_tensor.h

    absl::StatusOr<mlir::Attribute> ConvertTensorShapeProto(
        const TensorShapeProto& shape, mlir::MLIRContext* context);
    
    // Converts an MLIR elements attribute to a TensorFlow tensor proto.
    Status ConvertToTensorProto(mlir::ElementsAttr attr,
                                TensorProto* output_tensor);
    
    // Converts an MLIR elements attribute to a TensorFlow tensor.
    Status ConvertToTensor(mlir::ElementsAttr attr, Tensor* output_tensor);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 26 09:37:10 UTC 2024
    - 2.9K bytes
    - Viewed (0)
Back to top