The computing systems that run today’s AI algorithms are based on the von Neumann architecture which is inefficient at the task of shuttling huge amounts of data back and forth at high speeds. Thus, to build efficient cognitive computers, we need to transition to novel architectures where memory and processing are better collocated. In-memory computing is one such approach where the physical attributes and state dynamics of memory devices are exploited to perform certain computational tasks in place with very high areal and energy efficiency. In this tutorial, I will present our latest efforts in employing such a computational memory architecture for performing inference and training of deep neural networks. First, the phase-change memory technology we use as computational memory will be described. Next, the application of computational memory to neural network inference will be explained, and experimental results will be presented based on a state-of-the-art fully-integrated computational phase-change memory core. Finally, our latest efforts in employing such an architecture also for training neural networks will be elaborated.