cazala / synaptic

architecture-free neural network library for node.js and the browser
http://caza.la/synaptic
Other
6.91k stars 666 forks source link

Quick question... #269

Open ericlovesmath opened 6 years ago

ericlovesmath commented 6 years ago

What would happen if the training set had too many inputs and too many outputs? Lets say it usually takes 10 inputs and 10 outputs. Would it just take the first 10 elements of the training set? @cazala

cazala commented 6 years ago

There are no limits for the size of the inputs/outputs of an entry in a dataset. They just have to match the size of the network (inputs = size of the input layer, output = size of the output layer)

ericlovesmath commented 6 years ago

What if inputs > size of the input layer?

cazala commented 6 years ago

If using an optimized network (which is the behaviour by default) the extra inputs should be ignored, as if they didn't existed. In an unoptimized network it should throw an error.

ericlovesmath commented 6 years ago

What would happen if you input words? Also, How can I prevent negative weights/inputs/both? Also, How do I do myLSTM.activate(Input) without getting the values that are activated? @cazala @wagenaartje

wagenaartje commented 6 years ago

If you input words, you have to convert them (one-hot encoding probably). Maybe this and this will help you out.

You can't prevent negative weights, and don't try, because they are necessary.

You do need to prevent negative inputs, for that I point you to the articles I just mentioned.

What do you mean with your last question? Does it matter that you're getting the values back?

ericlovesmath commented 6 years ago

(Sorry I meant negative outputs :) ) My second question was, how can I get an output that doesn’t go through an activation function?@cazala @wagenaartje

bashz commented 6 years ago

You are not supposed to get negative outputs. and I guess you can't get an output without activation.