This error occurs because inputs is a Tensor object and does not have the numpy() method. You need to convert the Tensor object to a numpy array before passing it to the fit_transform method. You can do this using the numpy() method of the Tensor object as follows:

reducer.fit_transform(inputs.numpy())

This will convert the Tensor object to a numpy array and then pass it to the fit_transform method.

reducerfit_transforminputsnumpyAttributeError Tensor object has no attribute numpy

原文地址: https://www.cveoy.top/t/topic/bJer 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录