fixed a small bug with printing K in train.py