Deep neural networks trained on physical losses are emerging as promising surrogates of nonlinear numerical solvers. These tools can predict solutions of Maxwell's equations and compute gradients of output fields with respect to the material and geometrical properties in millisecond times which makes them attractive for inverse design or inverse scattering applications. Here we develop a tunable version of MaxwellNet with respect to incident power, a physics driven neural network able to compute light scattering from inhomogenous media with a size comparable with the incident wavelength in the presence of the optical Kerr effect. MaxwellNet maps the relation between refractive index and scattered field through a convolutional neural network. We introduce here extra fully connected layers to dynamically adjust the convolutional kernels such to take into account the intensity-dependent refractive index of the material. Finally we provide an example on how this network can be used for the topology optimization of microlenses robust to perturbations due to self-focusing.