used numpy dot product in train