INSTALLING TENSORFLOW AND JUPYTER NOTEBOOK


What is Anaconda and TensorFlow?

Anaconda is a distribution of the python and R programming languages of scientific computing, that aims to simplify package management and deployment. It includes many packages including SciPy, Numpy, Matplotlib, and Pandas. TensorFlow is an open-source software library that provides various functions to easily implement deep learning programs made by Google.


1. SETTING ENVIRONMENT


1) Virtual Environment Anaconda Installation


2) TensorFlow Installation

2-1) Install TensorFlow in the newly created virtual environment. (Run in Anaconda Prompt)

conda install tensorflow

2-2) Activate TensorFlow

activate tensorflow

2-3) Check TensorFlow version

2-4) Print “Hello World” 

3) Jupyter Notebook installation and run

conda install jupyter notebook

jupyter notebook

For detailed installation process, see here.


2. USING GOOGLE COLAB


How to used Colab

Log in with your Google Gmail account http://colab.research.google.com File > New notebook

How to use GPU

: Change Runtime Type Runtime > Change runtime type > Hardware accelerator – GPU Check GPU specification using command

Mount Google Drive

from google.colab import drive

drive.mount('/content/drive')


URL link > Confirm authentication key > Enter in Colab

Create and check “test_colab” folder

!mkdir -p '/content/drive/My Drive/test_colab'

!ls -Fcal '/content/drive/My Drive/test_colab'


Create a df.csv file in the above folder and save a matrix

import numpy as np

import pandas as pd


df = pd.DataFrame(np.random.rand(10, 5))

df.to_csv("/content/drive/My Drive/test_colab/df.csv")