What I did

What I learned

from google.colab import drive 
drive.mount("/content/gdrive", force_remount=True)

Then point it to the directory with the py scripts needed to be imported. Also install any packages not installed in colab by default.

import sys
sys.path.append('/content/gdrive/My Drive/Colab Notebooks/')
!pip install pytorch_lightning

Then makes sure GPU or TPU acceleration is enabled in colab and run the following:

if torch.cuda.is_available():
  device = torch.device("cuda")
else:
  device = torch.device("cpu")
print(str(device))
\[\begin{align} S_1 & = x_{i,1} \cdot \theta_1 \\ p(y_i & = 1| x_i, \theta) = \frac{e^{S_1}}{e^{S_1} + e^{S_2} + e^{S_1}} = p(y_1) \\ L1 & = - ln(p(y_1)) \end{align}\]

i is the layer of the neural net. The layer could be your training examples or actually the values for each node at a hidden layer. Hinge loss is more interesting. Hinge loss doesn’t penalize correct predictions if the it is confident enough.

\[L_i = \Sigma \space \text{max}(0, S_k - S_{true}+1)\]

It’s easier to just look at this slide lecture slide

alt

What I will do next