OperatorFuncs
public class OperatorFuncs
Convenient function APIs of operators.
-
Undocumented
Declaration
Swift
internal static func calculate(_ op: inout ComputableOperator, input: [Tensor], output: Tensor?) -> Tensor
-
sinh
-
tan
-
tanh
-
sin
-
cos
-
cosh
-
arcsin
-
arcsinh
-
arccos
-
arccosh
-
arctan
-
arctanh
-
degree
-
radian
-
floor
-
ceil
-
rint
-
round
-
abs
-
square
-
sqrt
-
exp
-
expm1
-
rsqrt
-
log
-
log2
-
log10
-
log1p
-
add
Declaration
-
sub
Declaration
-
mult
Declaration
-
div
Declaration
-
rdiv
Declaration
-
pow
Declaration
-
Matrix multiplication
Declaration
-
Matrix transpose
Declaration
-
broadcast
Declaration
Swift
public static func broadcast(_ shape: TensorShape, _ input: Tensor, output: Tensor? = nil) -> Tensor
-
Broadcasting add
Declaration
-
Broadcasting sub
Declaration
-
Broadcasting mult
Declaration
-
Broadcasting div
Declaration
-
Reduce sum
Declaration
-
Reduce product
Declaration
-
Reduce max
Declaration
-
Reduce min
Declaration
-
Reduce mean
Declaration
-
ReLU
Declaration
-
sigmoid
-
softplus
-
softsign
-
linear
-
ELU
Declaration
-
SELU
Declaration
-
Softmax
Declaration
-
LeakyReLU
Declaration
-
ThresholdedReLU
Declaration
-
batchnorm
Declaration
Swift
public static func batchnorm(_ input: Tensor, movingMean: Tensor, movingVar: Tensor, channelOrder: TensorChannelOrder = TensorChannelOrder.Last, useScale: Bool = true, scale: Tensor? = nil, useOffset: Bool = true, offset: Tensor? = nil, epsilon: Float = 0.001, output: Tensor? = nil) -> Tensor
-
MaxPool2D
Declaration
Swift
public static func maxPool2D(_ input: Tensor, kernelSize: [Int], stride: [Int]? = nil, channelOrder: TensorChannelOrder = TensorChannelOrder.Last, paddingMode: PaddingMode = PaddingMode.Valid, output: Tensor? = nil) -> Tensor
-
AvgPool2D
Declaration
Swift
public static func avgPool2D(_ input: Tensor, kernelSize: [Int], stride: [Int]? = nil, channelOrder: TensorChannelOrder = TensorChannelOrder.Last, paddingMode: PaddingMode = PaddingMode.Valid, output: Tensor? = nil) -> Tensor
-
SumPool2D
Declaration
Swift
public static func sumPool2D(_ input: Tensor, kernelSize: [Int], stride: [Int]? = nil, channelOrder: TensorChannelOrder = TensorChannelOrder.Last, paddingMode: PaddingMode = PaddingMode.Valid, output: Tensor? = nil) -> Tensor
-
convolution 2D
Declaration
Swift
public static func conv2D(_ input: Tensor, numFilters: Int, kernelSize: [Int], weight: Tensor, bias: Tensor? = nil, biasEnabled: Bool = true, stride: [Int] = [1, 1], padMode: PaddingMode = .Valid, channelPosition: TensorChannelOrder = TensorChannelOrder.First, output: Tensor? = nil) -> Tensor