टेंसरशेप

@frozen
public struct TensorShape : ExpressibleByArrayLiteral
extension TensorShape: Collection, MutableCollection
extension TensorShape: RandomAccessCollection
extension TensorShape: RangeReplaceableCollection
extension TensorShape: Equatable
extension TensorShape: Codable
extension TensorShape: CustomStringConvertible

एक टेन्सर के आकार का प्रतिनिधित्व करने वाली संरचना।

TensorShape पूर्णांकों की एक सरणी के चारों ओर एक पतला आवरण है जो आकार आयामों का प्रतिनिधित्व करता है। सभी टेंसर प्रकार अपने आकार को दर्शाने के लिए TensorShape उपयोग करते हैं।

  • आकृति के आयाम.

    घोषणा

    public var dimensions: [Int]
  • आयामों की एक श्रृंखला के साथ आरंभ करें। टेंसर की रैंक सरणी की लंबाई है।

    घोषणा

    public init(_ dimensions: [Int])

    पैरामीटर

    dimensions

    आकृति आयाम.

  • आयामों के संग्रह के साथ आरंभ करें. टेंसर की रैंक संग्रह की लंबाई है।

    घोषणा

    public init<C>(_ dimensions: C) where C : Collection, C.Element == Int

    पैरामीटर

    dimensions

    आकृति आयाम.

  • आकृति आयामों का प्रतिनिधित्व करने वाले शाब्दिक सरणी के साथ आरंभ करें। टेंसर की रैंक आयामों की संख्या है।

    घोषणा

    public init(arrayLiteral elements: Int...)

    पैरामीटर

    dimensions

    आकृति आयाम.

  • आकृति आयामों का प्रतिनिधित्व करने वाले विविध तत्वों के साथ आरंभ करें। टेंसर की रैंक तत्वों की संख्या है।

    घोषणा

    public init(_ elements: Int...)

    पैरामीटर

    dimensions

    आकृति आयाम.

  • घोषणा

    public init(repeating repeatedValue: Int, count: Int)
  • आकृति का क्रम (अर्थात आयामों की संख्या)।

    घोषणा

    public var rank: Int { get }
  • सन्निहित रूप से संग्रहीत सरणी के रूप में आकृति का आकार।

    घोषणा

    public var contiguousSize: Int { get }
  • घोषणा

    public typealias Element = Int
  • घोषणा

    public typealias Index = Int
  • घोषणा

    public typealias Indices = Range<Int>
  • आकृति का क्रम (अर्थात आयामों की संख्या)।

    घोषणा

    public var count: Int { get }
  • घोषणा

    public var indices: Indices { get }
  • घोषणा

    public var startIndex: Index { get }
  • घोषणा

    public var endIndex: Index { get }
  • घोषणा

    public func index(after i: Index) -> Index
  • i-वें आयाम के आकार तक पहुंचें।

    घोषणा

    public subscript(position: Index) -> Element { get set }

    पैरामीटर

    position

    एक आयाम का सूचकांक.

  • i-वें आयाम के आकार तक पहुंचें।

    घोषणा

    public subscript(bounds: Range<Int>) -> TensorShape { get set }

    पैरामीटर

    index

    एक आयाम का सूचकांक.

  • घोषणा

    public func index(_ i: Int, offsetBy distance: Int) -> Int
  • घोषणा

    public func distance(from start: Int, to end: Int) -> Int
  • घोषणा

    public typealias SubSequence = `Self`
  • घोषणा

    public init()
  • घोषणा

    public mutating mutating func append(_ newElement: Element)
  • घोषणा

    public mutating mutating func append(contentsOf newElements: TensorShape)
  • घोषणा

    public mutating mutating func append<S>(contentsOf newElements: S) where S : Sequence, S.Element == TensorShape.Element
  • घोषणा

    public mutating func replaceSubrange<C>(
      _ subrange: Range<Index>, with newElements: C
    ) where C: Collection, Element == C.Element
  • घोषणा

    public static func == (lhs: TensorShape, rhs: TensorShape) -> Bool
  • घोषणा

    public func encode(to encoder: Encoder) throws
  • घोषणा

    public init(from decoder: Decoder) throws
  • घोषणा

    public var description: String { get }