Git Product home page Git Product logo

alexnet's Introduction

Alexnet Finetune with Tensorflow

环境要求

  • Python 3
  • TensorFlow >= 1.8.0
  • Numpy

主要内容

  • alexnet.py: 定义alexnet网络结构
  • finetune.py: finetune过程代码
  • datagenerator.py: 输入数据封装器
  • validate_alexnet_on_imagenet.ipynb: 测试预训练模型的正确性
  • images/*: 测试图片
  • data/dataset/: 存放训练数据集,按类别分文件夹存放
  • data/gen_txt.py:生成datagenerator.py所需的train.txtval.txt
  • test.py:测试finetune训练效果

Finetune训练步骤

1.下载alexnet预训练模型,放到根目录下;

2.将目标数据集放到data/dataset目录下;

3.修改data/gen_txt.py中的dataset_dir为目标数据集;

4.在data/目录下运行命令:python gen_txt.py,即可生成相应的train.txtval.txt

5.在根目录下运行命令:python finetune.py 即可运行。

train.txt 示例:
/path/to/train/image1.png 0
/path/to/train/image2.png 1
/path/to/train/image3.png 2
/path/to/train/image4.png 0
.
.

alexnet's People

Contributors

weixun2018 avatar

Watchers

James Cloos 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.