SwiftCoreMLTools Documentation Beta

Structure Neural​Network

public struct NeuralNetwork: Items
%3 NeuralNetwork NeuralNetwork Codable Codable NeuralNetwork->Codable Items Items NeuralNetwork->Items

Conforms To

Items
Codable

Initializers

init(losses:​optimizer:​epoch​Default:​epoch​Set:​shuffle:​)

public init(losses: [Loss]? = nil, optimizer: Optimizer? = nil, epochDefault: UInt? = nil, epochSet: [UInt]? = nil, shuffle: Bool? = nil)

init(losses:​optimizer:​epoch​Default:​epoch​Set:​shuffle:​_:​)

public init(losses: [Loss]? = nil, optimizer: Optimizer? = nil, epochDefault: UInt? = nil, epochSet: [UInt]? = nil, shuffle: Bool? = nil, _ builder: () -> BaseLayer)

init(losses:​optimizer:​epoch​Default:​epoch​Set:​shuffle:​_:​)

public init(losses: [Loss]? = nil, optimizer: Optimizer? = nil, epochDefault: UInt? = nil, epochSet: [UInt]? = nil, shuffle: Bool? = nil, _ builder: () -> [BaseLayer])

init(from:​)

public init(from decoder: Decoder) throws

Properties

losses

let losses: [Loss]?

optimizer

let optimizer: Optimizer?

epoch​Default

let epochDefault: UInt?

epoch​Set

let epochSet: [UInt]?

shuffle

let shuffle: Bool?

layers

var layers: [BaseLayer]

Methods

add​Layer(_:​)

public mutating func addLayer(_ layer: BaseLayer)

encode(to:​)

public func encode(to encoder: Encoder) throws