4 replaced http://mathematica.stackexchange.com/ with https://mathematica.stackexchange.com/
source | link

I'm confused about how to set some of the basic properties of a neural network structure using Classify.

I'm trying to set the basic properties of a simple neural network, following Michael Nielsen's online introduction to neural networks and deep learning (which is all I've read on the topic so far, so please level answers accordingly).

I would like to follow the example there, and create a neural network classifier, with three layers of (28*28), 30, and 10 neurons all using logistic sigmoid activation functions. Mathematica seems to hide or override the ability to control some of the necessary properties of the design of the network, and I can't figure out how to take control of them.

For example, if I

T=ExampleData[{"MachineLearning","MNIST"},"TrainingData"];
c=Classify[T,Method->{"NeuralNetwork","HiddenLayers"->{{30,"LogisticSigmoid"}}}]

I get

ClassifierInformation[c]

As far as it goes, these properties are roughly what I'm looking for but it's not clear that they match the network I'm trying to build. Specifically:

  1. How do I specify the number of nodes and the activation function for the input layer?
  2. How do I specify the mapping between the input examples and the activations of the input layer?
  3. How do I specify the number of nodes and the activation function for the output layer?
  4. How do I specify mapping between the values of the correct outputs for each input and the activations in the output layer?

Mathematica seems to figure most of this out, recognizing the the input is an "Image", though I see no way of verifying how these are encoded in the input layer or how many nodes are used there. Similarly it seems to sort out the correct number of output categories. Though again, it's unclear how many nodes or used (or how much of the learning process was wasted identifying that number).

The resulting classifier performs is far slower to train than that one constructed by hand.

What options can I use to take control — explicitly setting 1-4 above — of the input and output layers to my neural network?


I'm aware that there are some related answersrelated answers, but they don't address the options I'm looking for.

I'm confused about how to set some of the basic properties of a neural network structure using Classify.

I'm trying to set the basic properties of a simple neural network, following Michael Nielsen's online introduction to neural networks and deep learning (which is all I've read on the topic so far, so please level answers accordingly).

I would like to follow the example there, and create a neural network classifier, with three layers of (28*28), 30, and 10 neurons all using logistic sigmoid activation functions. Mathematica seems to hide or override the ability to control some of the necessary properties of the design of the network, and I can't figure out how to take control of them.

For example, if I

T=ExampleData[{"MachineLearning","MNIST"},"TrainingData"];
c=Classify[T,Method->{"NeuralNetwork","HiddenLayers"->{{30,"LogisticSigmoid"}}}]

I get

ClassifierInformation[c]

As far as it goes, these properties are roughly what I'm looking for but it's not clear that they match the network I'm trying to build. Specifically:

  1. How do I specify the number of nodes and the activation function for the input layer?
  2. How do I specify the mapping between the input examples and the activations of the input layer?
  3. How do I specify the number of nodes and the activation function for the output layer?
  4. How do I specify mapping between the values of the correct outputs for each input and the activations in the output layer?

Mathematica seems to figure most of this out, recognizing the the input is an "Image", though I see no way of verifying how these are encoded in the input layer or how many nodes are used there. Similarly it seems to sort out the correct number of output categories. Though again, it's unclear how many nodes or used (or how much of the learning process was wasted identifying that number).

The resulting classifier performs is far slower to train than that one constructed by hand.

What options can I use to take control — explicitly setting 1-4 above — of the input and output layers to my neural network?


I'm aware that there are some related answers, but they don't address the options I'm looking for.

I'm confused about how to set some of the basic properties of a neural network structure using Classify.

I'm trying to set the basic properties of a simple neural network, following Michael Nielsen's online introduction to neural networks and deep learning (which is all I've read on the topic so far, so please level answers accordingly).

I would like to follow the example there, and create a neural network classifier, with three layers of (28*28), 30, and 10 neurons all using logistic sigmoid activation functions. Mathematica seems to hide or override the ability to control some of the necessary properties of the design of the network, and I can't figure out how to take control of them.

For example, if I

T=ExampleData[{"MachineLearning","MNIST"},"TrainingData"];
c=Classify[T,Method->{"NeuralNetwork","HiddenLayers"->{{30,"LogisticSigmoid"}}}]

I get

ClassifierInformation[c]

As far as it goes, these properties are roughly what I'm looking for but it's not clear that they match the network I'm trying to build. Specifically:

  1. How do I specify the number of nodes and the activation function for the input layer?
  2. How do I specify the mapping between the input examples and the activations of the input layer?
  3. How do I specify the number of nodes and the activation function for the output layer?
  4. How do I specify mapping between the values of the correct outputs for each input and the activations in the output layer?

Mathematica seems to figure most of this out, recognizing the the input is an "Image", though I see no way of verifying how these are encoded in the input layer or how many nodes are used there. Similarly it seems to sort out the correct number of output categories. Though again, it's unclear how many nodes or used (or how much of the learning process was wasted identifying that number).

The resulting classifier performs is far slower to train than that one constructed by hand.

What options can I use to take control — explicitly setting 1-4 above — of the input and output layers to my neural network?


I'm aware that there are some related answers, but they don't address the options I'm looking for.

3 added neural-networks tag and removed options tag
| link
    Tweeted twitter.com/StackMma/status/710744788182671360
2 Update image to match
source | link

I'm confused about how to set some of the basic properties of a neural network structure using Classify.

I'm trying to set the basic properties of a simple neural network, following Michael Nielsen's online introduction to neural networks and deep learning (which is all I've read on the topic so far, so please level answers accordingly).

I would like to follow the example there, and create a neural network classifier, with three layers of (28*28), 530, and 10 neurons all using logistic sigmoid activation functions. Mathematica seems to hide or override the ability to control some of the necessary properties of the design of the network, and I can't figure out how to take control of them.

For example, if I

T=ExampleData[{"MachineLearning","MNIST"},"TrainingData"];
c=Classify[T,Method->{"NeuralNetwork","HiddenLayers"->{{530,"LogisticSigmoid"}}}]

I get

ClassifierInformation[c]

As far as it goes, these properties are roughly what I'm looking for but it's not clear that they match the network I'm trying to build. Specifically:

  1. How do I specify the number of nodes and the activation function for the input layer?
  2. How do I specify the mapping between the input examples and the activations of the input layer?
  3. How do I specify the number of nodes and the activation function for the output layer?
  4. How do I specify mapping between the values of the correct outputs for each input and the activations in the output layer?

Mathematica seems to figure most of this out, recognizing the the input is an "Image", though I see no way of verifying how these are encoded in the input layer or how many nodes are used there. Similarly it seems to sort out the correct number of output categories. Though again, it's unclear how many nodes or used (or how much of the learning process was wasted identifying that number).

The resulting classifier performs considerably worse and is far slower to train than that one constructed by hand.

What options can I use to take control — explicitly setting 1-4 above — of the input and output layers to my neural network?


I'm aware that there are some related answers, but they don't address the options I'm looking for.

I'm confused about how to set some of the basic properties of a neural network structure using Classify.

I'm trying to set the basic properties of a simple neural network, following Michael Nielsen's online introduction to neural networks and deep learning (which is all I've read on the topic so far, so please level answers accordingly).

I would like to follow the example there, and create a neural network classifier, with three layers of (28*28), 5, and 10 neurons all using logistic sigmoid activation functions. Mathematica seems to hide or override the ability to control some of the necessary properties of the design of the network, and I can't figure out how to take control of them.

For example, if I

T=ExampleData[{"MachineLearning","MNIST"},"TrainingData"];
c=Classify[T,Method->{"NeuralNetwork","HiddenLayers"->{{5,"LogisticSigmoid"}}}]

I get

ClassifierInformation[c]

As far as it goes, these properties are roughly what I'm looking for but it's not clear that they match the network I'm trying to build. Specifically:

  1. How do I specify the number of nodes and the activation function for the input layer?
  2. How do I specify the mapping between the input examples and the activations of the input layer?
  3. How do I specify the number of nodes and the activation function for the output layer?
  4. How do I specify mapping between the values of the correct outputs for each input and the activations in the output layer?

Mathematica seems to figure most of this out, recognizing the the input is an "Image", though I see no way of verifying how these are encoded in the input layer or how many nodes are used there. Similarly it seems to sort out the correct number of output categories. Though again, it's unclear how many nodes or used (or how much of the learning process was wasted identifying that number).

The resulting classifier performs considerably worse and is far slower to train than that one constructed by hand.

What options can I use to take control — explicitly setting 1-4 above — of the input and output layers to my neural network?


I'm aware that there are some related answers, but they don't address the options I'm looking for.

I'm confused about how to set some of the basic properties of a neural network structure using Classify.

I'm trying to set the basic properties of a simple neural network, following Michael Nielsen's online introduction to neural networks and deep learning (which is all I've read on the topic so far, so please level answers accordingly).

I would like to follow the example there, and create a neural network classifier, with three layers of (28*28), 30, and 10 neurons all using logistic sigmoid activation functions. Mathematica seems to hide or override the ability to control some of the necessary properties of the design of the network, and I can't figure out how to take control of them.

For example, if I

T=ExampleData[{"MachineLearning","MNIST"},"TrainingData"];
c=Classify[T,Method->{"NeuralNetwork","HiddenLayers"->{{30,"LogisticSigmoid"}}}]

I get

ClassifierInformation[c]

As far as it goes, these properties are roughly what I'm looking for but it's not clear that they match the network I'm trying to build. Specifically:

  1. How do I specify the number of nodes and the activation function for the input layer?
  2. How do I specify the mapping between the input examples and the activations of the input layer?
  3. How do I specify the number of nodes and the activation function for the output layer?
  4. How do I specify mapping between the values of the correct outputs for each input and the activations in the output layer?

Mathematica seems to figure most of this out, recognizing the the input is an "Image", though I see no way of verifying how these are encoded in the input layer or how many nodes are used there. Similarly it seems to sort out the correct number of output categories. Though again, it's unclear how many nodes or used (or how much of the learning process was wasted identifying that number).

The resulting classifier performs is far slower to train than that one constructed by hand.

What options can I use to take control — explicitly setting 1-4 above — of the input and output layers to my neural network?


I'm aware that there are some related answers, but they don't address the options I'm looking for.

1
source | link