GithubHelp home page GithubHelp logo

mystudy_tensorflow's Introduction

这将记录我从零开始学习tensorflow2.x板块

准备工作:安装tensorflow

tensorflow 分为 cpu 版本 和 gpu版本

这里,我们主要了解cpu版本的tensorflow 选择的安装方法为: cmd 中 执行 pip install tensorflow

  • 遇到的坑:如果电脑中没有Microsoft Visual Studio 2015-2019的话, 安装结束后 ,在import的时候会报错
  • 安装成功检测: 在cmd中输入 pip install tensorflow 出现一系列的 Requirement already satisfied:... 随后进入python解释器,试着import tensorflow as tf, 如果没有报错,即安装成功!

下面就进入每天的学习把! (每一天的代码里都会有我自己详细的注释,自己查阅资料的笔记,以及自己的思考等...)

  • 为了方便不同平台的使用者,每天的代码都会以.ipynb的格式和.py的格式上传。
  • 首先介绍一下Fashion MNIST数据集,它是7万张灰度图像组成,可以分成10个类别.每个灰度图像都是28*28像素的图像.我们将使用其中的6万张进行训练网络,另外的1万张来评估准确率.
  • 他是为了后面的利用tensorflow进行该数据集的基本分类问题来做准备
  • 根据day1的数据,来建立预测模型,完成了第一个模型的建立。 并进行对测试集的准确率测试。
  • 对fashion_mnist数据集进行归一化处理, 对归一化之后的数据集进行归一化建模, 对比和没有归一化数据建立的模型, 发现准确率有了一定程度的提升。所以,对于数据集进行归一化处理还是相当有必要的。
  • 建立之前的模型的时候,调用Keras.callbacksAPI里的方法(ModelCheckpoint, EarlyStopping , TensorBoard)
  • 还有其他的方法,可以参考中文文档 https://keras.io/zh/callbacks/#_1
  • 对于tensorboard 的调用, 可以见day4 里的三张截图, 打开步骤: 在callbacks所在的根目录下,进行cmd命令的调用,然后 输入tensorboard --logdir callbacks, 调用以后 输入(我这里)localhost:6006
  • 基于之前的数据集,建立最简单的深度神经网络
  • 使用for _ in range(20) 建立20层神经网络, 使用relu 和 softmax 的激活函数
  • 对之前的模型,进行数据的批归一化、激活函数的更改尝试、以及dropout的使用,dropout的使用是为了缓解过拟合现象
  • 引用新的数据集,也是keras.datasets里的加利福利亚的房价数据
  • 使用之前回归模型的房价数据
  • wide&deep ---函数API实现
  • subclass ---子类API实现
  • multi-input , multi-output ---多输入, 多输出实现

mystudy_tensorflow's People

Contributors

lesliecheni avatar

Stargazers

sunny avatar MIKE AXIDER avatar  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.