V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
imn1
V2EX  ›  Python

dnn/knn 样本变化后是要重新训练么?

  •  
  •   imn1 · 2020-08-10 23:24:56 +08:00 · 1601 次点击
    这是一个创建于 1347 天前的主题,其中的信息可能已经有所发展或是发生改变。
    读取前面的训练结果(pickle),然后对新样本训练,前面的训练结果就没了
    能否增量,或者有其他方案可以增量吗?

    不太懂其中算法,如果是要各个节点互相计算,这就难办了……
    第 1 条附言  ·  2020-08-11 01:38:27 +08:00
    搜了一下
    https://scikit-learn.org/stable/tutorial/basic/tutorial.html

    Refitting and updating parameters
    Hyper-parameters of an estimator can be updated after it has been constructed via the set_params() method. Calling fit() more than once will overwrite what was learned by any previous fit():

    overwrite,难怪,看样子要用其他方案……
    4 条回复    2020-08-11 08:32:56 +08:00
    Rivers7
        1
    Rivers7  
       2020-08-10 23:32:05 +08:00   ❤️ 1
    dnn 模型保存 继续训练
    wy
        2
    wy  
       2020-08-10 23:39:42 +08:00 via Android   ❤️ 1
    如果样本的特征没变,分布情况没变,等同于又多了点训练数据,那模型是可以继续训练的。
    imn1
        3
    imn1  
    OP
       2020-08-11 00:05:02 +08:00
    @wy
    @Rivers7
    看样子还是没读懂程序,看人家写的 train 就是两个 sklearn.SVC.fid ,然后保存 object
    我就把 object load 出来,fid 新数据,再保存
    第二次保存后,第一次测试正确的图片全部失败……
    Rivers7
        4
    Rivers7  
       2020-08-11 08:32:56 +08:00
    torch 和 tf 这些深度学习库是可以保存参数,下次训练重新 load 模型加入新样本继续训练的
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3415 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 00:40 · PVG 08:40 · LAX 17:40 · JFK 20:40
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.