it would be good to call clear() before the training. it's not a problem now, but might help to avoid bugs in future