Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

parameters is a (collection of weights and biases), parameter x is a (nxm) matrix, the sample_batch function just samples n random samples from a normal

parameters is a (collection of weights and biases), parameter x is a (nxm) matrix, the sample_batch function just samples n random samples from a normal dist and returns the x and the y which is just a function(x).image text in transcribed

1. 3pts Write the code for a fully-connected neural network (multi-layer perceptron) with one 10-dimensional hidden layer and a tanh nonlinearirty. You must write this yourself using only basic operations like matrix multiply and tanh, you may not use layers provided by a library. This network will output the mean vector, test that it outputs the correct shape for some random parameters. # Neural Network Function function neural net(x,0) return #TODO end # Random initial Parameters 0 = #TODO @testset "neural net mean vector output" begin n = 100 x,y = sample_batch(target_f1,n) u = neural net(x,0) @test size() == (n,) end 1. 3pts Write the code for a fully-connected neural network (multi-layer perceptron) with one 10-dimensional hidden layer and a tanh nonlinearirty. You must write this yourself using only basic operations like matrix multiply and tanh, you may not use layers provided by a library. This network will output the mean vector, test that it outputs the correct shape for some random parameters. # Neural Network Function function neural net(x,0) return #TODO end # Random initial Parameters 0 = #TODO @testset "neural net mean vector output" begin n = 100 x,y = sample_batch(target_f1,n) u = neural net(x,0) @test size() == (n,) end

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions