Code Monkey home page Code Monkey logo

learndl's Introduction

学习DL过程中的作业

学习fasf.aiPart 1过程中的作业,使用Jupiter NoteBook,Python3。

作业一:调用Keras的VGG16实现猫狗图片区分

  • 数据来源:Kaggle
  • 结果:见lesson1/lesson1_hw.ipynb
  • 小节:入门作业,学习过程有问题,在后续学习中注意参数含义的学习。
  • 数据存储格式:
    mini_dogscats/
      test/
        1.jpg
        2.jpg
        ...
      train/
        cat/
          cat0.jpg
          cat1.jpg
          ...
        dog/
          dog0.jpg
          dog1.jpg
          ...
      valid/
        cat/
          cat0.jpg
          cat1.jpg
          ...
        dog/
          dog0.jpg
          dog1.jpg
          ...

作业二:Finetune VGG16,修改最后一层从1000维输出为2维输出

结果:0.16476 实现流程:

  1. 修改Vgg16网络最后一层,从1000维输出为2维输出
  2. 训练新网络获得权重,并通过测试validate集查看该网络的表现
  3. 在训练集上进行预测
  4. 提交结果

在作业二中几个值得注意的地方:

  • 我们使用sgd作为优化器,学习率设为1e-3
  • test文件夹内的文件格式应为
test1/
    test/        # could be any name
        1.jpg
        2.jpg
        ...

而不是

test/        # could be any name
    1.jpg
    2.jpg
    ...
  • 生成的结果顺序为字母表顺序,即:
    1.jpg
    10.jpg
    100.jpg
    1000.jpg
    1001.jpg
    ...

我们使用正则表达式提取文件中的数字重新排序,得到

    1.jpg
    2.jpg
    3.jpg
    4.jpg
    5.jpg
    ...

learndl's People

Contributors

xiaoyueduan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.