Check failed: axis < ndim && axis >= -ndim axis 1 exceeds the input dimension of 1

Oh, so guess you fixed your issue @mouryarishik for Resolving Check failed: axis < ndim && axis >= -ndim axis 1 exceeds the input dimension of 1?