The in-memory computing paradigm aims at overcoming the intrinsic inefficiencies of Von-Neumann computers by reducing the data-transport per arithmetic operation. Crossbar arrays of multilevel memristive devices enable efficient calculations of matrix-vector-multiplications, an operation extensively called on in artificial intelligence (AI) tasks. Resistive random-access memories (ReRAMs) are promising candidate devices for such applications. However, they generally exhibit large stochasticity and device-to-device variability. The integration of a sub-stoichiometric metal-oxide within the ReRAM stack can improve the resistive switching graduality and stochasticity. To this purpose, a conductive TaOx layer is developed and stacked on HfO2 between TiN electrodes, to create a complementary metal-oxide-semiconductor-compatible ReRAM structure. This device shows accumulative conductance updates in both directions, as required for training neural networks. Moreover, by reducing the TaOx thickness and by increasing its resistivity, the device resistive states increase, as required for reduced power consumption. An electric field-driven TaOx oxidation/reduction is responsible for the ReRAM switching. To demonstrate the potential of the optimized TaOx/HfO2 devices, the training of a fully-connected neural network on the Modified National Institute of Standards and Technology database dataset is simulated and benchmarked against a full precision digital implementation.