In some social networks, the opinion forming is based on its own and neighbors' (initial) opinions, whereas the evolution of the individual opinions is also influenced by the individual's past opinions in the real world. Unlike existing social network models, in this paper, a novel model of opinion dynamics is proposed, which describes the evolution of the individuals' opinions not only depends on its own and neighbors' current opinions, but also depends on past opinions. Memory and memoryless communication rules are simultaneously established for the proposed opinion dynamics model. Sufficient and/or necessary conditions for the equal polarization, consensus and neutralizability of the opinions are respectively presented in terms of the network topological structure and the spectral analysis. We apply our model to simulate Kahneman's seminal experiments on choices in risky and riskless contexts, which fits in with the experiment results.Simulation analysis shows that the memory capacity of the individuals is inversely proportional to the speeds of the ultimate opinions formational.