tensorflow torch matplotlib numpy math