TransposedConvolution2D
public struct TransposedConvolution2D<Element, Device> : LayerType, Codable where Element : RandomizableType, Device : DeviceType
A 2D transposed (fractionally strided) convolutional layer
-
Declaration
Swift
public var parameterPaths: [WritableKeyPath<`Self`, Tensor<Element, Device>>] { get } -
Convolution filters, shape [outputChannels, inputChannels, kernelHeight, kernelWidth]
Declaration
Swift
public var filters: Tensor<Element, Device> -
Bias vector, shape [1, outputChannels, 1, 1]
Declaration
Swift
public var bias: Tensor<Element, Device> -
Stride fraction >= 1
Declaration
Swift
public let stride: Int -
Number of elements that are removed from the edges of the output.
Declaration
Swift
public let inset: Int? -
Declaration
Swift
public var parameters: [Tensor<Element, Device>] { get } -
Creates a 2D transposed (fractionally strided) convolutional layer.
The inputs of the layer must have a shape [batchSize, channels, height, width]
Declaration
Swift
public init(inputChannels: Int, outputChannels: Int, kernelSize: (width: Int, height: Int), inset: Int? = nil, stride: Int = 1)Parameters
inputChannelsNumber of channels in the input
outputChannelsNumber of channels in the output
kernelSizeWidth and height of the convolution kernel
insetNumber of elements that are removed from the edges of the output.
strideInverse of stride, with which the convolution kernel is moved over the input tensor, >= 1.
View on GitHub
TransposedConvolution2D Structure Reference