ניתן למיזוג

public protocol Mergeable : AdditiveArithmetic, Differentiable

סוג עם ערכים התומכים בפעולות בינאריות הניתנות להבדלה.

משמש על ידי BidirectionalRecurrentLayer כדרישה גנרית לפונקציות מיזוג.

  • משרשרת שני ערכים.

    הַצהָרָה

    @differentiable
    static func concatenate(_ lhs: Self, _ rhs: Self) -> Self
  • מוסיף שני ערכים ומפיק את הסכום שלהם.

    הערה

    שינוי שם sum ל- + גורם לקריסת מהדר בעת התאמה של Tensor ל- Mergeable (SR-13229).

    הַצהָרָה

    @differentiable
    static func sum(_ lhs: Self, _ rhs: Self) -> Self
  • ממוצע של שני ערכים.

    הַצהָרָה

    @differentiable
    static func average(_ lhs: Self, _ rhs: Self) -> Self
  • מכפיל שני ערכים.

    הַצהָרָה

    @differentiable
    static func multiply(_ lhs: Self, _ rhs: Self) -> Self
  • ערימה שני ערכים.

    הַצהָרָה

    @differentiable
    static func stack(_ lhs: Self, _ rhs: Self) -> Self