The UpdateWeights function is now integrated into the RestrictedBoltzmannMachine type.