Adding mnist stuff for gradient testing