BIT AI

Getting started


First off all, you need to set up environment for creating and training your models, so let's do it!

WARNING: I recomend you to use unix-based system (Ubuntu, Mint, Fedora, MacOS etc.)

If you are ready, simply click Ctrl+Alt+T to open the terminal

Check your python version, simply type in terminal:


    $ python3

You should see sometihng like this:

Python 3.7.3 (default, Aug 20 2019, 17:04:43) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more 
information.
>>>

If your version of Python is 3 or higher you can install pip module


    $ sudo apt-get install python3-pip

Now you can use pip to install Python modules, but first clone BIT_AI github repository

    $ git clone https://github.com/aghbit/BIT_AI.git
    $ cd BIT_AI

Great! Now you are ready to install necessary Python modules


Type in terminal

    $ python3 -m pip install -r requirements.txt

Check if everything is correct, try to import: numpy, tensorflow, matplotlib, sklearn

Now let's install jupyter!


{bash}
    $ sudo apt-get install jupyter

And of course you should check if jupyter works

{bash}
    $ jupyter notebook

Hint Type Ctrl+c to stop jupyter server :)

Another way to use jupyter notebook is docker


First time:

{bash}
$ docker run -it -p port_on_host:8888 --name container_name jupyter/scipy-notebook

Otherwise:

  $ docker start -i container_name

to enter notebook go to browser and type http://localhost:$$/?token=$$

In [6]:
import numpy as np

import matplotlib as mpl
import matplotlib.pyplot as plt

import tensorflow as tf

import warnings
warnings.filterwarnings('ignore')
In [8]:
arr = np.zeros((1,2,3))
arr
Out[8]:
array([[[0., 0., 0.],
        [0., 0., 0.]]])
In [6]:
x = np.linspace(-1.4, 1.4, 30)
plt.plot(x, x, 'g--', x, x**2, 'r:', x, x**3, 'b^')
plt.show()

That's all! You are ready to learn some Machine Learning!