Skip to main content

Basics of Neural Networks

For example, this is more or less the standard 1980's style multilayer backpropagation network

Download original notebook
chain = NetChain[{
  LinearLayer[5], 
  ElementwiseLayer[Tanh], 
  LinearLayer[5], 
  ElementwiseLayer[Tanh], 
  LinearLayer[1]
}]
(*VB[*)temporalStorage$578090(*,*)(*"1:eJwlkMlum1AAAGnVQ9WvaHKyoRJgHLB7g8cOBrOUgqMcoDyCAbM/s3x9s1xGoznOQ9K42VcMw4Yfb5DS69j0wRVOXvYFwyw4gjy+1s8bPBCe8e3PDf4L327wR/o31JexPMnGLPJO3qFe2IVCQ4jWbk0Gjy7G/mbMQ/v3eFX48s9Ma3qhW6F0Dy8kCHx3TF1/Zgn//HQny9WL9hlnmNBvjdJ28mXNIlmOi2UXK1Wbc/Qe5NqlOtbVwBxBYpcuDQKLuiwKMbPsMhwiakA6F0hpxXVAjUEtozFHpiHVayL4ESoK7nCC6vrED+qluU1dHYk2s/M8U6bP1BVRcglZ9R75g3NAc9DSc6Bp5s0xMzFxjTXUWkZp/w20AgAzvSbEdD94op2juikpprfI/Unvu3PC8p3beUdzjCxiysnXNERjxkDLqaWy9rhG0keQTHwak2ouPL5/fAkEfPvyuf/bG1xUQe/7u8A4tetq+ah+j+B/8FGETg=="*)(*]VB*)

Train on the input data

f[x_] := (*SpB[*)Power[Sinc[x](*|*),(*|*)2](*]SpB*) - 1.0

trained = 
 NetTrain[chain, Table[x -> f[x], {x, 0, 5.0, 0.25}], TimeGoal -> 20]

Test the trained net

Plot[{f[x], trained[x]}, {x,0,5}, PlotStyle->{Opacity[0.5], Opacity[1.0]}]
(*VB[*)(FrontEndRef["299c7f76-47e6-44f6-9666-f5a04dcae447"])(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KRCeEJBwK8rPK3HNS3GtSE0uLUlMykkNVgEKG1laJpunmZvpmpinAgmTNDNdSzMzM90000QDk5TkxFQTE3MAe4UVZQ=="*)(*]VB*)

Show the process of the fitting live

Module[{
  data = {{0.,0.}, {1.0,0.}},
  loss = 0.0
},
  updateGraph[net_, l_] := (
    data = Table[{t, net[t]}, {t,2,5.0,0.3}];
    loss = l;
  );

  Plot[f[x], {x,2,5}, Epilog->{
    Red, Line[data // Offload],
    Black, Text[loss // Offload, {3.2, -0.93}]
  }]
]

trained = 
 NetTrain[chain, Table[x -> f[x], {x, 2.0, 5.0, 0.2}], TimeGoal -> 60, TrainingProgressReporting -> {(updateGraph[#Net, #AbsoluteBatch];)&, "Interval"->0.15}]
 

Multidimensional networks

Construct a base network that takes vector inputs of size 2 and produces vector outputs of size 3:

net = NetChain[{30, Sin, 3, Tanh, 3, LogisticSigmoid}, "Input" -> 2]
(*VB[*)temporalStorage$577950(*,*)(*"1:eJwlkEluo0AAAMloDtG8YiYnG0YyjR2W3KAxuxeWEEyUA8gQNgOmaQy8PtulVKpj/YsbJ/1FEAT684ntOe+bzs+Tm5veEcQ+6WEW5fXrgvSlV3L5d0H+J5cL8gE8JcYklDvFHGXRzq64k5hAaih5z8wxckHRdxdzRO2LkKti+TwC3SiMfbAdAn+lh57Tnx1v5Cjv+DisytnTNylnWonXmuXBzqY5PSlKVExMpFZtxoENzPSwEuoKrQUYH0oHQH9Ph5NKjSw7If5EI2xw/vZccVeoRbBWcJ9hy9zWcyx5J1wUHL9LtPnRRlrYXG7X+iQf1ozrWgo40jmmlTJhNbzxkM3j0W/B6Ou6dbGtVI4dcw70dq02PAIqhOvbe0zdBt6RjyOum5Luem0YVmJ07RhKNOuorG2OkVOkp+wLWLWBML8/h4JllDkrwdS+8KIGuGYnPHx9fPMlcvn2s//3JxxcJe79lyTR+VBX03f1Opx8AFfugw8="*)(*]VB*)

Make a table of 16 randomly initialized copies of the base network:

nets = Table[
   NetInitialize[net, 
    Method -> {"Random", "Weights" -> 3, "Biases" -> 2}, 
    RandomSeeding -> Automatic], 16];

Make a gallery

row = Range[-2, 2, 0.04];
coords = Tuples[row, 2];
plot[net_] := Image[Partition[net[coords], Length[row]]];
Multicolumn@Table[plot[net], {net, nets}]
(*GB[*){{(*VB[*)(FrontEndRef["fcf4a3f1-190b-4b61-b637-ea7da0675919"])(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KRCeEJBwK8rPK3HNS3GtSE0uLUlMykkNVgEKpyWnmSQapxnqGloaJOmaJJkZ6iaZGZvrpiaapyQamJmbWhpaAgCNCBWj"*)(*]VB*)(*|*),(*|*)(*VB[*)(FrontEndRef["668c0203-390c-4fba-8ef7-62b91284b344"])(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KRCeEJBwK8rPK3HNS3GtSE0uLUlMykkNVgEKm5lZJBsYGRjrGlsaJOuapCUl6lqkppnrmhklWRoaWZgkGZuYAAB5oBUU"*)(*]VB*)(*|*),(*|*)(*VB[*)(FrontEndRef["31c0f045-10bb-46f5-9389-6fbd82de5495"])(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KRCeEJBwK8rPK3HNS3GtSE0uLUlMykkNVgEKGxsmG6QZmJjqGhokJemamKWZ6loaW1jqmqUlpVgYpaSamliaAgB7SxVM"*)(*]VB*)(*|*),(*|*)(*VB[*)(FrontEndRef["8117d3c4-d298-4763-8d76-62193ba48599"])(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KRCeEJBwK8rPK3HNS3GtSE0uLUlMykkNVgEKWxgamqcYJ5vophhZWuiamJsZ61qkmJvpmhkZWhonJZpYmFpaAgBy6BSh"*)(*]VB*)}(*||*),(*||*){(*VB[*)(FrontEndRef["358d6570-21e4-40d3-b67b-c6d60246c2ea"])(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KRCeEJBwK8rPK3HNS3GtSE0uLUlMykkNVgEKG5tapJiZmhvoGhmmmuiaGKQY6yaZmSfpJpulmBkYmZglG6UmAgB1IhU7"*)(*]VB*)(*|*),(*|*)(*VB[*)(FrontEndRef["7a06a947-ccdf-44c6-8241-5291f7c13dc2"])(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KRCeEJBwK8rPK3HNS3GtSE0uLUlMykkNVgEKmycamCVampjrJienpOmamCSb6VoYmRjqmhpZGqaZJxsapyQbAQCCtxV0"*)(*]VB*)(*|*),(*|*)(*VB[*)(FrontEndRef["4fbbc2af-cfd5-48a6-bed5-cd6f8635ca31"])(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KRCeEJBwK8rPK3HNS3GtSE0uLUlMykkNVgEKm6QlJSUbJabpJqelmOqaWCSa6SalAlnJKWZpFmbGpsmJxoYAog4Www=="*)(*]VB*)(*|*),(*|*)(*VB[*)(FrontEndRef["a5cfe7ed-6980-4a36-8202-a9856e2c1d0d"])(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KRCeEJBwK8rPK3HNS3GtSE0uLUlMykkNVgEKJ5omp6Wap6bomllaGOiaJBqb6VoYGRjpJlpamJqlGiUbphikAACJ3xWo"*)(*]VB*)}(*||*),(*||*){(*VB[*)(FrontEndRef["b3066118-cfec-4adf-b289-9daa8b0a5513"])(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KRCeEJBwK8rPK3HNS3GtSE0uLUlMykkNVgEKJxkbmJkZGlroJqelJuuaJKak6SYZWVjqWqYkJlokGSSamhoaAwCK9xX7"*)(*]VB*)(*|*),(*|*)(*VB[*)(FrontEndRef["d654d4bf-3ec1-4f26-826f-655fff3be30b"])(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KRCeEJBwK8rPK3HNS3GtSE0uLUlMykkNVgEKp5iZmqSYJKXpGqcmG+qapBmZ6VoYmaXpmpmapqWlGSelGhskAQCKahYL"*)(*]VB*)(*|*),(*|*)(*VB[*)(FrontEndRef["f59811f4-39ff-4013-beb0-8482331e91ca"])(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KRCeEJBwK8rPK3HNS3GtSE0uLUlMykkNVgEKp5laWhgappnoGlumpemaGBga6yalJhnoWphYGBkbG6ZaGiYnAgB8YhVE"*)(*]VB*)(*|*),(*|*)(*VB[*)(FrontEndRef["e101fb60-520c-48d1-b0f8-710e406746e2"])(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KRCeEJBwK8rPK3HNS3GtSE0uLUlMykkNVgEKpxoaGKYlmRnomhoZJOuaWKQY6iYZpFnomhsapJoYmJmbmKUaAQB8KRUC"*)(*]VB*)}(*||*),(*||*){(*VB[*)(FrontEndRef["ab0b1985-81e3-4787-99ec-3cb44fe51bdb"])(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KRCeEJBwK8rPK3HNS3GtSE0uLUlMykkNVgEKJyYZJBlaWpjqWhimGuuamFuY61papibrGicnmZikpZoaJqUkAQCBJxXd"*)(*]VB*)(*|*),(*|*)(*VB[*)(FrontEndRef["fa48b139-93c1-4b51-a7cc-9fddd6b1b186"])(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KRCeEJBwK8rPK3HNS3GtSE0uLUlMykkNVgEKpyWaWCQZGlvqWhonG+qaJJka6iaaJyfrWqalpKSYJRkmGVqYAQCI8BYE"*)(*]VB*)(*|*),(*|*)(*VB[*)(FrontEndRef["04532cb8-44a8-4f60-8f68-bad10af22c85"])(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KRCeEJBwK8rPK3HNS3GtSE0uLUlMykkNVgEKG5iYGhslJ1nompgkAok0MwNdizQzC92kxBRDg8Q0I6NkC1MAeyIVbg=="*)(*]VB*)(*|*),(*|*)(*VB[*)(FrontEndRef["f89e5d6d-61f2-4dfa-b545-df485ad8ac39"])(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KRCeEJBwK8rPK3HNS3GtSE0uLUlMykkNVgEKp1lYppqmmKXomhmmGemapKQl6iaZmpjqpqSZWJgmplgkJhtbAgCQsRZI"*)(*]VB*)}}(*]GB*)

To be continued. More examples are expected

Pretrained networks

There are a few networks available at hand

{(*VB[*)(Hue[0.02])(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KRCeGJAIcndyzs/JLwouTyxJzghJzS3ISSxJTWMGyXMgyRcxg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zghJzS3ISSxJTWMGyXMgyRcxgMEH+6Idcq2vA3e8s4eKMDAAAEfOF9k="*)(*]VB*),(*VB[*)(Hue[0.18])(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KRCeGJAIcndyzs/JLwouTyxJzghJzS3ISSxJTWMGyXMgyRcV2HJdX1zw1r6IAQw+wBgMDABU9hcq"*)(*]VB*),(*VB[*)(Hue[0.2])(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KRCeGJAIcndyzs/JLwouTyxJzghJzS3ISSxJTWMGyXMgyRfNmAkCL+2LGMDgA4zBwAAAbAkYGg=="*)(*]VB*)} // DeleteAnomalies
" | Time elapsed: | Training example used: | Current best method: | Current loss: | "
{(*VB[*)(Hue[0.02])(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KRCeGJAIcndyzs/JLwouTyxJzghJzS3ISSxJTWMGyXMgyRcxgMEH+6Idcq2vA3fss4eKMDAAAEW+F6k="*)(*]VB*),(*VB[*)(Hue[0.04])(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KRCeGJAIcndyzs/JLwouTyxJzghJzS3ISSxJTWMGyXMgyRcxgMEH+6Idcq2vA3ecs4eKMDAAAEZuF7k="*)(*]VB*),(*VB[*)(Hue[0.06])(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KRCeGJAIcndyzs/JLwouTyxJzghJzS3ISSxJTWMGyXMgyRcxgMEH+yKu64sLbLmu20NFGBgAOK8Wrg=="*)(*]VB*),(*VB[*)(Hue[0.08])(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KRCeGJAIcndyzs/JLwouTyxJzghJzS3ISSxJTWMGyXMgyRcxgMEH+6Idcq2vA3fcs4eKMDAAAEceF8k="*)(*]VB*),(*VB[*)(Hue[0.1])(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KRCeGJAIcndyzs/JLwouTyxJzghJzS3ISSxJTWMGyXMgyRcxgMEH+yITYxB4bA8VYWAAAClBFbI="*)(*]VB*),(*VB[*)(Hue[0.12])(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KRCeGJAIcndyzs/JLwouTyxJzghJzS3ISSxJTWMGyXMgyRcxgMEH+yKu64sLbLme20NFGBgAOV8Wvg=="*)(*]VB*),(*VB[*)(Hue[0.14])(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KRCeGJAIcndyzs/JLwouTyxJzghJzS3ISSxJTWMGyXMgyRcxgMEH+6JHVSLr3B++soeKMDAAAEehF8w="*)(*]VB*),(*VB[*)(Hue[0.16])(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KRCeGJAIcndyzs/JLwouTyxJzghJzS3ISSxJTWMGyXMgyRcxgMEH+6Idcq2vA3e8s4eKMDAAAEfOF9k="*)(*]VB*),(*VB[*)(Hue[0.18])(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KRCeGJAIcndyzs/JLwouTyxJzghJzS3ISSxJTWMGyXMgyRcV2HJdX1zw1r6IAQw+wBgMDABU9hcq"*)(*]VB*),(*VB[*)(Hue[0.2])(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KRCeGJAIcndyzs/JLwouTyxJzghJzS3ISSxJTWMGyXMgyRfNmAkCL+2LGMDgA4zBwAAAbAkYGg=="*)(*]VB*)}

or more complicated

net = NetModel["LeNet Trained on MNIST Data"]
(*VB[*)temporalStorage$747219(*,*)(*"1:eJwlkc1ymlAAhWmni06foslKoTNC0AvpTBb8KgISufyImSxALoLgRZErwmP0iWPSzTdnzu585yGp3ew7RVGXX3doadHWTVCgDv77RlEr1Cp5XOC3ER3Ib/T494j+Q49H9CP3Fy17rvQ566ZJdk6um7WriUoLxCQik3UiN2Ta6FZ13RZd4XhW7QwKhB5GfPrKX71DyxiZX6BFiWcaRrmNT5rImwKUjHNhYx/EVVmogw4uxpk3sdSnTlSd8c1JbvsK76Wj6857Z7pDVQ+APdv6ZlIvu6ZtNusF6QCBRsswSqhZAjzG58uC58VkZwqi4Os2hzrzGu3mg2jlicB2WllUcENAUg1zNvQYdWo+8VubKG6aghbXe51Z+GHiuRAxcbpayblEOCNQHe1UBvF0rlmT7el2jiBrH4+Ruc6k7HblUajLp0OQC7PVQV0aM2UC7tPDmMuP5kRhVWNZZumzUwrNRc+a5wS4kzBXeqDrd0mS8loP04jHrck+7V9eHj+dvwcyPX7/f9WPO1xSIfjzM6A4dXDVf7VeQ9AH8nGRcw=="*)(*]VB*)
net[(*VB[*)(FrontEndRef["61b89c71-af6b-4364-8ac0-d817b1043649"])(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KRCeEJBwK8rPK3HNS3GtSE0uLUlMykkNVgEKmxkmWVgmmxvqJqaZJemaGJuZ6FokJhvoplgYmicZGoAELAF/1xUV"*)(*]VB*), "Probabilities"];

KeyValueMap[Function[{key, value}, 
  Item[key, FontSize->16, Background->Blend[{White, Red},  value]]
], %];
{%} // TableForm
(*GB[*){{0(*VB[*)(**)(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KWnMIB47kPAsSc11yq9IY4JJB5XmpBZzABlu+XklwZlVqZkCQA6aPBeQ4ZSYnJ1elF+aBzUNpCfI3ck5Pye/qIgBDD7Ygxgp2569RzDQTOIBMoJLijIL/PM88wpKS4pZQVYn5hSnAgBABSut"*)(*]VB*)(*|*),(*|*)1(*VB[*)(**)(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KWnMIB47kPAsSc11yq9IY4JJB5XmpBZzABlu+XklwZlVqZkCQA6aPBeQ4ZSYnJ1elF+aBzUNpCfI3ck5Pye/qIgBDD7YgxgOkVceIxhoJvEAGcElRZkF/nmeeQWlJcWsIKsTc4pTAQKUKm8="*)(*]VB*)(*|*),(*|*)2(*VB[*)(**)(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KWnMIB47kPAsSc11yq9IY4JJB5XmpBZzABlu+XklwZlVqZkCQA6aPBeQ4ZSYnJ1elF+aBzUNpCfI3ck5Pye/qIgBDD7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fIRhoJvEAGcElRZkF/nmeeQWlJcWsIKsTc4pTARkgKuM="*)(*]VB*)(*|*),(*|*)8(*VB[*)(**)(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KWnMIB47kPAsSc11yq9IY4JJB5XmpBZzABlu+XklwZlVqZkCQA6aPBeQ4ZSYnJ1elF+aBzUNpCfI3ck5Pye/qIgBDD7Ygxhf8uvfIRhoJvEAGcElRZkF/nmeeQWlJcWsIKsTc4pTATX6K28="*)(*]VB*)(*|*),(*|*)9(*VB[*)(**)(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KWnMIB47kPAsSc11yq9IY4JJB5XmpBZzABlu+XklwZlVqZkCQA6aPBeQ4ZSYnJ1elF+aBzUNpCfI3ck5Pye/qIgBDD7Ygxj/Jq98h2CgmcQDZASXFGUW+Od55hWUlhSzgqxOzClOBQBXwiwf"*)(*]VB*)}}(*]GB*)

Speech recognizer

deepspeech = NetModel["Deep Speech 2 Trained on Baidu English Data"];

Now use this snippet to record an audio

And paste the recorded

deepspeech[(*VB[*)(Notebook`Editor`Kernel`PCMAudio`Internal`dump$240402)(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KRCeEJBwK8rPK3HNS3GtSE0uLUlMykkNVgEKGyQbGKWZGRrpphkYm+uamBsl6lqkGqXqGpolppqbpyYaWpgbAwB6ThU9"*)(*]VB*)];
StringJoin @@ %
"so what about lunch"