Keras-mxnet: new optimizer RAdam gives AssertionError

I wanted to give the new optimizer RAdam a try in my Keras + MXNet project. So I added a Keras implementation of this optimizer to keras/optimizers.py. However, when fitting the model, I get an AssertionError in assert isinstance(optimizer, opt.Optimizer).

Does anyone know what additional steps are needed in order to make sure that MXNet recognizes my custom optimizer?

I think the optimiser must be an instance of mxnet.optimiser i.e. you may not be able to use keras optimiser… you may re-write the optimiser in mxnet?