Hi Phil. The reason this isn’t working as you expect is because you’re trying to run a swarm, which does not allow you to input your own encoder configuration. The whole point of a swarm is to automatically identify the best set of encoder params for the sample input data you give it. It will return you model parameters that include a configuration for a scalar encoder. If, at that point, you want to change the w and n values, you can simply change the model parameters it returns to you before creating a model with it.
For a complete example of this (albeit a bit old), see this tutorial: