Lab1 - GitHub Pages · Command Prompt - vc-14 wincertstore- wheel-e. 31.1 certifi-2ø18. python-3....

13
Lab1 陈厚双 [email protected]

Transcript of Lab1 - GitHub Pages · Command Prompt - vc-14 wincertstore- wheel-e. 31.1 certifi-2ø18. python-3....

Page 1: Lab1 - GitHub Pages · Command Prompt - vc-14 wincertstore- wheel-e. 31.1 certifi-2ø18. python-3. 5 conda create name tensorflow python: 3.5 3 13 81 143 18.2 2e.8 KB

Lab1陈厚双

[email protected]

Page 2: Lab1 - GitHub Pages · Command Prompt - vc-14 wincertstore- wheel-e. 31.1 certifi-2ø18. python-3. 5 conda create name tensorflow python: 3.5 3 13 81 143 18.2 2e.8 KB

Model training

• How well will the model generalize to new data?

• Use some test data to check

Appropriate-fitting

Page 3: Lab1 - GitHub Pages · Command Prompt - vc-14 wincertstore- wheel-e. 31.1 certifi-2ø18. python-3. 5 conda create name tensorflow python: 3.5 3 13 81 143 18.2 2e.8 KB

• Split dataset to training and test

• Training models on training dataset

• The evaluation of the model is the error on test dataset

Model training

Page 4: Lab1 - GitHub Pages · Command Prompt - vc-14 wincertstore- wheel-e. 31.1 certifi-2ø18. python-3. 5 conda create name tensorflow python: 3.5 3 13 81 143 18.2 2e.8 KB

Cross validation

• Purpose• maximize the use of the available data for training and then testing a model

• Hand-Out method

Page 5: Lab1 - GitHub Pages · Command Prompt - vc-14 wincertstore- wheel-e. 31.1 certifi-2ø18. python-3. 5 conda create name tensorflow python: 3.5 3 13 81 143 18.2 2e.8 KB

Cross validation

• Purpose• maximize the use of the available data for training and then testing a model

• Hand-Out method

• K-fold classification

Page 6: Lab1 - GitHub Pages · Command Prompt - vc-14 wincertstore- wheel-e. 31.1 certifi-2ø18. python-3. 5 conda create name tensorflow python: 3.5 3 13 81 143 18.2 2e.8 KB

Machine Learning Process

Page 7: Lab1 - GitHub Pages · Command Prompt - vc-14 wincertstore- wheel-e. 31.1 certifi-2ø18. python-3. 5 conda create name tensorflow python: 3.5 3 13 81 143 18.2 2e.8 KB

Tensorflow Installation

• Step1: Install anaconda• https://www.anaconda.com/distribution/

Page 8: Lab1 - GitHub Pages · Command Prompt - vc-14 wincertstore- wheel-e. 31.1 certifi-2ø18. python-3. 5 conda create name tensorflow python: 3.5 3 13 81 143 18.2 2e.8 KB

Tensorflow Installation

• Step1: Install anaconda• https://www.anaconda.com/distribution/

• After successful installation, check in anaconda prompt through ‘conda’

Page 9: Lab1 - GitHub Pages · Command Prompt - vc-14 wincertstore- wheel-e. 31.1 certifi-2ø18. python-3. 5 conda create name tensorflow python: 3.5 3 13 81 143 18.2 2e.8 KB

Tensorflow Installation

• Step2: create virtual environment• conda create –name tensorflow python=3.5

• It downloads the necessary packages needed for TensorFlow setup

Page 10: Lab1 - GitHub Pages · Command Prompt - vc-14 wincertstore- wheel-e. 31.1 certifi-2ø18. python-3. 5 conda create name tensorflow python: 3.5 3 13 81 143 18.2 2e.8 KB

Tensorflow Installation

• Step3: activate tensorflow environment• conda activate tensorflow

Page 11: Lab1 - GitHub Pages · Command Prompt - vc-14 wincertstore- wheel-e. 31.1 certifi-2ø18. python-3. 5 conda create name tensorflow python: 3.5 3 13 81 143 18.2 2e.8 KB

Tensorflow Installation

• Step4: install tensorflow• pip install tensorflow==1.13.1

• pip install tensorflow-gpu==1.13.1

Step5: test tensorflow

Page 12: Lab1 - GitHub Pages · Command Prompt - vc-14 wincertstore- wheel-e. 31.1 certifi-2ø18. python-3. 5 conda create name tensorflow python: 3.5 3 13 81 143 18.2 2e.8 KB

Tensorflow Introduction

• http://cs224d.stanford.edu/lectures/CS224d-Lecture7.pdf

• A simple demo for this lab• https://www.kaggle.com/chenhoushuang/cnn-demo

Page 13: Lab1 - GitHub Pages · Command Prompt - vc-14 wincertstore- wheel-e. 31.1 certifi-2ø18. python-3. 5 conda create name tensorflow python: 3.5 3 13 81 143 18.2 2e.8 KB

Q&A