Reputation: 752
I am trying to learn tflearn
. But I have a few doubts.
In the following line
net = tflearn.input_data(shape=[None, len(train_x[0])])
is len(train_x[0])
the shape of my output matrix? If not, what is it?
Second doubt is: what is 8 in this line?
net = tflearn.fully_connected(net, 8)
I tried to search and I found it is n_units
, but what are they, and how am I supposed to choose how many units I will require in which case?
Upvotes: 2
Views: 2087
Reputation: 489
The line
net = tflearn.input_data(shape=[None, len(train_x[0])])
means that tflearn expects that the input to your network has shape [?, len(train_x[0])
]. In your case, I think that train_x
is a matrix, meaning that len(train_x[0])
would give you the number of columns in your matrix.
If you look at the documentation for tflearns fully connected layer (http://tflearn.org/layers/core/), you will see that the 8 corresponds to the n_units
argument
net = tflearn.fully_connected(net, 8)
meaning this line will create a fully connected layer with 8 hidden units/neurons.
Upvotes: 1