Creating a new network

Our network will be as simple as having input data followed by FullyConnected layers and SoftmaxOutput. There's no need to add any complexity as the features are already precalculated:

arch = @mx.chain mx.Variable(:data) =>  mx.FullyConnected(num_hidden=length(CLASSES)) =>  mx.SoftmaxOutput(mx.Variable(:label))nnet_new = mx.FeedForward(arch, context = mx.gpu())optimizer = mx.ADAM()

Get Hands-On Computer Vision with Julia now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.