sudo dnf -y install dnf-plugins-core
sudo dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
sudo dnf config-manager --set-enabled docker-ce-test
sudo dnf config-manager --set-disabled docker-ce-stable
import matplotlib.pyplot as plt | |
from mpl_toolkits.axes_grid1 import ImageGrid | |
import numpy as np | |
import PIL | |
def thumb_grid(im_list, grid_shape, fname_out, scale=1.0, axes_pad=0.07, figsize=(7, 7), dpi=900): | |
assert len(grid_shape) == 2 # Grid must be 2D: | |
assert np.prod(grid_shape) >= len(im_list) # Make sure all images can fit in grid: | |
plt.figure(figsize=figsize, dpi=dpi) |
import matplotlib.pyplot as plt | |
from mpl_toolkits.axes_grid1 import ImageGrid | |
import numpy as np | |
import PIL | |
import cv2 | |
import glob | |
import os | |
def apply_plot_style(xlim, ylim, xlabel, ylabel, grid): | |
plt.clf() |
'''Train a Siamese MLP on pairs of digits from the MNIST dataset. | |
It follows Hadsell-et-al.'06 [1] by computing the Euclidean distance on the | |
output of the shared network and by optimizing the contrastive loss (see paper | |
for mode details). | |
[1] "Dimensionality Reduction by Learning an Invariant Mapping" | |
http://yann.lecun.com/exdb/publis/pdf/hadsell-chopra-lecun-06.pdf | |
Run on GPU: THEANO_FLAGS=mode=FAST_RUN,device=gpu,floatX=float32 python mnist_siamese_graph.py |
#@title Dataset info { form-width: "800px" } | |
# e.g GOOGLE_DRIVE_FILE_URL: https://drive.google.com/open?id=1CZyDkHHjS8SUVBF7fBwoTAF6xSpLmD4P7 | |
LinkFile = "GOOGLE_DRIVE_FILE_URL" #@param {type:"string"} | |
# e.g GOOGLE_DRIVE_FILENAME_WITH_EXTENSION: Local History.csv | |
Filename = "GOOGLE_DRIVE_FILENAME_WITH_EXTENSION" #@param {type:"string"} | |
Filename = Filename.replace(' ', '\ ') |
#!/bin/bash | |
if [ -d ~/miniconda3 ] | |
then | |
echo "Deleting directory ~/miniconda3..." | |
rm -rf ~/miniconda3 ~/.conda |
#1. Update system | |
sudo apt-get update | |
#2.Install packages to allow apt to use a repository over HTTPS: | |
sudo apt-get install \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
software-properties-common |
wget http://get.docker.com -O docker-install.sh | |
sudo chmod +x docker-install.sh | |
./docker-install.sh | |
sudo groupadd docker | |
sudo usermod -aG docker $USER | |
sudo systemctl enable docker | |
sudo apt-get install -y install docker-compose | |
sudo reboot |
sudo add-apt-repository ppa:graphics-drivers/ppa | |
sudo apt update | |
sudo ubuntu-drivers autoinstall | |
sudo reboot |
# This file may be used to create an environment using: | |
# $ conda create --name <env> --file <this file> | |
# platform: linux-64 | |
@EXPLICIT | |
https://repo.anaconda.com/pkgs/main/linux-64/_tflow_select-2.1.0-gpu.tar.bz2 | |
https://repo.anaconda.com/pkgs/main/linux-64/blas-1.0-mkl.tar.bz2 | |
https://repo.anaconda.com/pkgs/main/linux-64/ca-certificates-2019.5.15-0.tar.bz2 | |
https://repo.anaconda.com/pkgs/main/linux-64/cudatoolkit-10.0.130-0.tar.bz2 | |
https://repo.anaconda.com/pkgs/main/linux-64/intel-openmp-2019.4-243.tar.bz2 | |
https://repo.anaconda.com/pkgs/main/linux-64/libgcc-ng-9.1.0-hdf63c60_0.tar.bz2 |