You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2020/01/07 06:23:20 UTC

[GitHub] [incubator-mxnet] gengyanlei commented on issue #17224: 关于mxnet.gluon的一些建议(使用方面)

gengyanlei commented on issue #17224: 关于mxnet.gluon的一些建议(使用方面)
URL: https://github.com/apache/incubator-mxnet/issues/17224#issuecomment-571453654
 
 
   @wkcn 主要数据分发之后,预测结果需要像上面代码一样,对结果还需要遍历计算,不利于后续的相关操作,例如精度计算等。
    
   ![微信截图_20200107120038](https://user-images.githubusercontent.com/22360785/71871716-1014c800-3155-11ea-95b2-436fefa8b839.png)
   
   我的意思其实是把输入数据concat,直接输入网络,得到1个预测结果,我不关心哪个结果属于哪个gpu(没有意义),然后计算loss时,只需要操作1次;
   
   像.step(batch_size=1)这样的操作可以完全写死的,这种灵活操作完全没有必要;
   数据分发这个我不清楚,可能部署时需要,但是在学术上面没考虑过这个,应该既可以分发,又可以写个封装API;对于很多人来说,手动数据分发的概率很小,我同学基本上都首选pytorch的开源项目,我从insightface入坑mxnet,从symbol转到gluon,不停的阅读mxnet官方API,感觉symbol数据读取比tf好用(仅数据读取方面),但是损失计算不如tf;然后gluon数据读取和pytorch基本一致(但是一个是PIL,一个是Ndarray,操作细节又很多坑),缺少一些东西(设置某个操作的发生概率,这个缺少,我提过);但是gluon的结果预测,计算损失,学习率设置,都有些别扭,例如,学习率不能按照epoch设置,我查阅了所有的学习率API,都是按照step,不是按照epoch,不过可以通过set_learning_rate方法设置。
   ![微信截图_20200107141931](https://user-images.githubusercontent.com/22360785/71873077-3e94a200-3159-11ea-9ad3-046b0265207c.png)
   
   
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services