  Quantum tomography is currently ubiquitous for testing any implementation of
a quantum information processing device. Various sophisticated procedures for
state and process reconstruction from measured data are well developed and
benefit from precise knowledge of the model describing state preparation and
the measurement apparatus. However, physical models suffer from intrinsic
limitations as actual measurement operators and trial states cannot be known
precisely. This scenario inevitably leads to state-preparation-and-measurement
(SPAM) errors degrading reconstruction performance. Here we develop and
experimentally implement a machine learning based protocol reducing SPAM
errors. We trained a supervised neural network to filter the experimental data
and hence uncovered salient patterns that characterize the measurement
probabilities for the original state and the ideal experimental apparatus free
from SPAM errors. We compared the neural network state reconstruction protocol
with a protocol treating SPAM errors by process tomography, as well as to a
SPAM-agnostic protocol with idealized measurements. The average reconstruction
fidelity is shown to be enhanced by 10\% and 27\%, respectively. The presented
methods apply to the vast range of quantum experiments which rely on
tomography.
