Neural Netwrok Trainer implemented in a thread class