10-08-2024, 09:28 PM
(10-08-2024, 04:00 PM)jrmrhrb00 Wrote: AB,
I will attach a file for an or gate. I haven't figured out how to do multiple gates. I couldn't do an attachment. So, I put it in as code/
...
Dear JR,
let's go together one step at a time.
Step one.
When you train a neural network to perform operations of only one type (for example, "or"), then the neural network perceives all input data as data FOR THE "OR" OPERATION.
If you want your neural network to work correctly with mixed data of different types, then all input data (both training and working) must additionally contain information ABOUT the TYPE of operation for which these data are intended.
That is, if, while using a neural network, you supply 0 and 1 to the input, then the neural network must also know FOR WHICH OPERATION these input data are intended.
To do this, you will have to add another input to the neural network.
The OPERATION CODE that the neural network must perform with the data that will be at that moment at the other two inputs will be fed to this input.
That is, if the code "0" denotes the "AND" operation, the code "1" denotes the "OR" operation, and the code "2" denotes the "NOT" operation, then the input combination of numbers "1,0,1" will mean "Perform the OR operation on the numbers 0 and 1.".
A neural network trained on such data will be able to work successfully on input data that is organized in the same way.
This is the first step.