一、参考资料
二、问题描述
在多项式回归时numpyarray转化为tensor后发生了这样的错误。AttributeError: 'Tensor' object has no attribute 'poly_features'
true_w,features,poly_features,labels=[torch.tensor(x,dtype=torch.float32)for x in [true_w,features,poly_features,labels]]
features[:2].poly_features[:2,:],labels[:2]
三、出错原因
找不到。
四、解决方法
如有大佬知道解决方法,请不吝赐教。
非常非常感谢。