Warning: session_start(): open(/var/lib/php/sessions/sess_tdba36j9f4hsm330ue52213mcs, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
!7
cmodule PerceptronSpike > DynPrintLogAndEnabled {
switchable int nExamples = 200;
L examples;
transient Perceptron perceptron;
switchable double c = 1;
switchable bool randomizeC = false;
switchable bool startWithRandomWeights = true;
start-thread {
if (l(examples) != nExamples)
setField(examples := repF(nExamples, () -> {
int x = rand(640), y = rand(360);
ret new Perceptron.Example(x, y, y < f(x) ? -1 : 1);
}));
perceptron = new Perceptron;
copyAllFields(module(), perceptron);
for ping (Double error : perceptron.trainingIterator()) {
if (!enabled) continue with sleepSeconds(1);
if (error != null)
perceptron.printWithWeights();
}
}
}