Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Using the MNIST data set on ConvNet JS, try to change the structure of the netwo

ID: 3859107 • Letter: U

Question

Using the MNIST data set on ConvNet JS, try to change the structure of the network (e.g. adding more nodes, adding more layers, subtracting stuff) to improve the performance. Uses 20K views as the cutoff point to do the assessing. Show the Loss Graphs of both the original and the improved configuration. This is how you assess performance. If you cannot improve it, suggest why. If you did improve the system comment on how you did it.

Note that there will be a bit of randomness in play here, and that just because one configuration converges better one time, does not man that it will always do so. But for the sake of simplification of the assignment, we will assume that this randomness is not there.

Explanation / Answer

var net = new Net<double>();

net.AddLayer(new InputLayer(1, 1, 2));

net.AddLayer(new FullyConnLayer(20));

net.AddLayer(new ReluLayer());

net.AddLayer(new FullyConnLayer(10));

net.AddLayer(new SoftmaxLayer(10));

var x = new Volume(new[] { 0.3, -0.5 }, new Shape(2));

var prob = net.Forward(x);

Console.WriteLine("probability that x is class 0: " + prob.Get(0));

var trainer = new SgdTrainer(net) { LearningRate = 0.01, L2Decay = 0.001 };

trainer.Train(x, new Volume(new[] { 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }, new Shape(1, 1, 10, 1)));

var prob2 = net.Forward(x);

Console.WriteLine("probability that x is class 0: " + prob2.Get(0));

var net = FluentNet<double>.Create(24, 24, 1)

                   .Conv(5, 5, 8).Stride(1).Pad(2)

                   .Relu()

                   .Pool(2, 2).Stride(2)

                   .Conv(5, 5, 16).Stride(1).Pad(2)

                   .Relu()

                   .Pool(3, 3).Stride(3)

                   .FullyConn(10)

                   .Softmax(10)

                   .Build();

var json = net.ToJsonN();

Net deserialized = SerializationExtensions.FromJson<double>(json);

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote