removing mallocs from neural propagate