-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
heamy中训练集的x如果传进去稀疏矩阵会报错,请问该怎么解决 #3
Comments
这是行数不一样,检查下数据的行列是不是一样 |
一样的,看过了,这个bug调了快一天了,一直报那样的错误。这是代码,就是您写的Tencent那个baseline,我想进行改进,用stacking: train_x = sparse.load_npz('train_x.npz') dataset = Dataset(train_x,train_y,val_x) #就在这一行会报那个错误 感谢(如果可以希望能加上您联系方式,交流一下,qq277248199)! |
因为稀疏矩阵不支持分片,你可以减少特征,转成稠密矩阵 |
嗯嗯,谢谢,我看了稀疏矩阵那个包里面的方法,train_x=sparse.load_npz('train_x.npz').tolil() |
toarray()试试 |
嗯嗯,toarray()方法也都试过,不过可能由于稀疏矩阵太占内存,转array提示Memoryerror |
会报这样的错,谢谢!
The text was updated successfully, but these errors were encountered: