numpy.object_ is often referring to a mixed data type used in numpy or a collection of arrays having a different shape, which is not supported in PyTorch.
Here is a small example:
a = np.array([np.random.randn(1), np.random.randn(1, 1)])
a
> array([[-0.8689455135513591],
         [0.6826695103629262]], dtype=object)

x = torch.from_numpy(a)
> TypeError: can't convert np.ndarray of type numpy.object_. The only supported types are: float64, float32, float16, complex64, complex128, int64, int32, int16, int8, uint8, and bool.

Make sure the numpy array contains values in the same dtype in the same shape.