我是 python 的新手Nmf
。我正在尝试创建图像列表以获取组件。这是代码:
from skimage import color
from skimage import io
import matplotlib.pyplot as plt
f=color.rgb2gray(io.imread('f.jpg'))
e=color.rgb2gray(io.imread('e.jpg'))
images2= (e,f)
from sklearn.decomposition import NMF
model=NMF(n_components=2)
features=model.fit_transform(images2)
然后出现下一个错误:
Found array with dim 3. Estimator expected <= 2.