Fixed trainFromLog