I hereby claim:
- I am aminehy on github.
- I am amine_hy (https://keybase.io/amine_hy) on keybase.
- I have a public key ASCuvs4CY-NYKpzwhW2V2aA9nBkxefzj8bRld7Vvx_TRGAo
To claim this, I am signing this object:
# Implementation of CNN/ConvNet Model using PyTorch (depicted in the picture above) | |
class CNN(torch.nn.Module): | |
def __init__(self): | |
super(CNN, self).__init__() | |
# L1 ImgIn shape=(?, 28, 28, 1) | |
# Conv -> (?, 28, 28, 32) | |
# Pool -> (?, 14, 14, 32) | |
self.layer1 = torch.nn.Sequential( |
import torch | |
import torchvision.datasets as dsets | |
batch_size = 32 | |
# MNIST dataset | |
mnist_train = dsets.MNIST(root='MNIST_data/', | |
train=True, | |
transform=transforms.ToTensor(), |
print('Training the Deep Learning network ...') | |
learning_rate = 0.001 | |
criterion = torch.nn.CrossEntropyLoss() # Softmax is internally computed. | |
optimizer = torch.optim.Adam(params=model.parameters(), lr=learning_rate) | |
train_cost = [] | |
train_accu = [] | |
batch_size = 32 | |
training_epochs = 15 |
def triplet_loss_function(im_anchor, im_positive, im_negative, alpha = 0.2): | |
""" | |
Implementation of the triplet loss function | |
Source: https://arxiv.org/pdf/1503.03832.pdf | |
Arguments: | |
y_pred -- python list containing three objects: | |
anchor -- the encodings for the anchor images, of shape (None, 128) | |
positive -- the encodings for the positive images, of shape (None, 128) |
xhost + | |
docker run -it --rm -v $(pwd):/workspace \ | |
--runtime=nvidia -w /workspace \ | |
-v /tmp/.X11-unix:/tmp/.X11-unix \ | |
-e DISPLAY=$DISPLAY \ | |
-p 8888:8888 -p 6006:6006 | |
aminehy/ai-lab:latest |
I hereby claim:
To claim this, I am signing this object:
name: app | |
channels: | |
- conda-forge | |
- anaconda | |
dependencies: | |
- flask | |
- gunicorn | |
- pip: |
FROM continuumio/miniconda3 | |
LABEL Author, Amine HadjYoucef | |
ENV APP_HOME /app | |
WORKDIR $APP_HOME | |
COPY . $APP_HOME | |
#---------------- Prepare the envirennment | |
RUN conda update --name base conda &&\ | |
conda env create --file environment.yaml |
import numpy as np | |
print('Hello World !') | |
print('Numpy version is ', np.__version__) |
. | |
├── Dockerfile | |
├── environment.yaml | |
├── main.py | |
└── requirements.py |