useMl.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:sensorimotorProject 作者: iaakhter 项目源码 文件源码
def train(self):
        print "Training"
        #xTrain = processImages.convertImageToArray(self.numberOfExamples, self.imagePath)
        xTrain = processImages.constructXFromTargetFocusLocations(self.numberOfExamples, 4,self.imagePath)
        yTrain = processImages.convertLabelToArray(self.numberOfExamples, 2,self.labelPath)
        yTrain = np.reshape(yTrain,(xTrain.shape[0],2))
        self.model = MLPRegressor(hidden_layer_sizes=(30,),alpha=1.0)
        self.model.fit(xTrain,yTrain)
        joblib.dump(self.model,'sklearnModel.pkl')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号