Convert weights to fix point precision if needed

Fixes issue #2423.