In designing a recurrent neural network, it is usually of prime importance to guarantee the convergence in the dynamics of the network. We propose to modify this picture: if the brain remembers by converging to the state representing familiar patterns, it should also diverge from such states when presented with an unknown encoded representation of a visual image. We propose to capture this behavior using a nonlinear line attractor network. This model encapsulates attractive fixed points scattered in the state space representing patterns with similar characteristics as an attractive curved line. The dynamics of the nonlinear line attractor network is designed such that when the network is able to reach equilibrium (stable), the input is considered as one of the stored patterns. Conversely, when the network is unable to reach equilibrium (unstable), the input is considered to be dissimilar to the stored patterns and therefore is considered as pattern of another class. Several experiments on benchmark problems have shown that the proposed model can be very useful for discriminating patterns.