Global

Methods

MAIN()

KEEP: XOR data gen const NUM_SETS = 50; const NUM_PER_SET = 2; const D_INPUTS = []; const D_TARGETS = []; for (let i = 0; i < NUM_SETS; ++i) { const num_a = Math.round(Math.random()); const num_b = Math.round(Math.random()); D_INPUTS.push([num_a, num_b]); const equal = num_a === num_b; D_TARGETS.push([equal ? 1 : 0, !equal ? 1 : 0]); } console.log('D_INPUTS'); console.log(JSON.stringify(D_INPUTS)); console.log('D_TARGETS'); console.log(JSON.stringify(D_TARGETS)); process.exit(-7); /
Source: