ResNet18
public struct ResNet18<Element, Device> : LayerType where Element : RandomizableType, Device : DeviceType
Residual neural network with 18 layers (17 convolutional, 1 dense)
-
Declaration
Swift
public var parameters: [Tensor<Parameter, `Self`.Device>] { get }
-
Declaration
Swift
public var parameterPaths: [WritableKeyPath<`Self`, Tensor<Element, Device>>] { get }
-
Undocumented
Declaration
Swift
public var start: Sequential<Sequential<Convolution2D<Element, Device>, BatchNorm<Element, Device>>, Relu<Element, Device>>
-
Undocumented
Declaration
Swift
public var l1: Sequential<ResidualBlock<Element, Device>, ResidualBlock<Element, Device>>
-
Undocumented
Declaration
Swift
public var l2: Sequential<ResidualBlock<Element, Device>, ResidualBlock<Element, Device>>
-
Undocumented
Declaration
Swift
public var l3: Sequential<ResidualBlock<Element, Device>, ResidualBlock<Element, Device>>
-
Undocumented
Declaration
Swift
public var l4: Sequential<ResidualBlock<Element, Device>, ResidualBlock<Element, Device>>
-
Undocumented
Declaration
Swift
public var classifier: Sequential<Sequential<AdaptiveAvgPool2D<Element, Device>, Flatten<Element, Device>>, Sequential<Dense<Element, Device>, LogSoftmax<Element, Device>>>
-
Undocumented
Declaration
Swift
public init(inputShape: [Int], classes: Int)