Skip to content

Instantly share code, notes, and snippets.

View snsmssss's full-sized avatar
🎯
Focusing

Sambath Parthasarathy snsmssss

🎯
Focusing
  • DataEver consulting
  • India
View GitHub Profile
@snsmssss
snsmssss / untitled3.ipynb
Created August 16, 2020 15:26
Untitled3.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@snsmssss
snsmssss / Output with Error message
Created August 1, 2020 11:24
Output Error message
Epoch 0 loss: 0.334
Epoch 10 loss: 0.305
Epoch 20 loss: 0.118
Epoch 30 loss: 0.072
Epoch 40 loss: 0.049
Epoch 50 loss: 0.047
Epoch 60 loss: 0.046
Epoch 70 loss: 0.037
Epoch 80 loss: 0.024
---------------------------------------------------------------------------
@snsmssss
snsmssss / gist:0369052c6daf7a001660e51ba9da9e92
Last active August 1, 2020 11:15
simple nn code using autograd in pytorch
import torch
def sigmoid(x):
# Sigmoid activation function: f(x) = 1 / (1 + e^(-x))
sx = 1.0 / (1.0 + torch.exp(-x))
return sx
# y_true and y_pred are numpy arrays of the same length.
def mse_loss(y_true, y_pred):
return torch.mean((y_true - y_pred) ** 2)