double -> float for mean
train mlp