- install
cuda-9.0
(https://developer.nvidia.com/cuda-toolkit-archive) - install
cudnn-7
(https://developer.nvidia.com/cudnn) - install dependencies for caffe
- see the caffe installation guide [1] and wiki page [2]
- install
boost-1.65
or higher (http://www.boost.org/users/history/version_1_65_1.html) [3] - update
caffe-fast-rcnn
- Easiest way is to use a rebased branch on
BVLC/master
. See the notes below if you would rather merge the changes yourself.
$ cd $FRCN_ROOT/caffe-fast-rcnn
- Easiest way is to use a rebased branch on
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM nvidia/cuda:8.0-cudnn6-devel-ubuntu16.04 | |
ENV PACKAGES_ROOT=/opt | |
RUN apt-get update && apt-get install -y --no-install-recommends \ | |
build-essential \ | |
cmake \ | |
git \ | |
wget \ | |
libatlas-base-dev \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
from torchvision import datasets | |
class ImageFolderWithPaths(datasets.ImageFolder): | |
"""Custom dataset that includes image file paths. Extends | |
torchvision.datasets.ImageFolder | |
""" | |
# override the __getitem__ method. this is the method that dataloader calls | |
def __getitem__(self, index): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
EPSILON = 1e-10 | |
def _error(actual: np.ndarray, predicted: np.ndarray): | |
""" Simple error """ | |
return actual - predicted |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using MXNet | |
import MXNet.mx: _update_single_output, reset!, get | |
using Distributions | |
##################################### | |
# Custom evaluation metric | |
# It just summarize predictions, because in the case of custom | |
# loss layer, ANN output equals to loss function itself |
The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.
The correct way of creating a private frok by duplicating the repo is documented here.
For this assignment the commands are:
- Create a bare clone of the repository.
(This is temporary and will be removed so just do it wherever.)
git clone --bare [email protected]:usi-systems/easytrace.git
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## youtube video: https://youtu.be/AJDo9gpkEcg | |
library("readr") | |
library("ggplot2") | |
## read.csv() <- from base R. DON'T USE! | |
hw5 <- read_csv("homework_5.csv") # from readr | |
hw5$A <- factor(hw5$A) | |
hw5$B <- factor(hw5$B) | |
hw5$C <- factor(hw5$C) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def multireplace(string, replacements, ignore_case=False): | |
""" | |
Given a string and a replacement map, it returns the replaced string. | |
:param str string: string to execute replacements on | |
:param dict replacements: replacement dictionary {value to find: value to replace} | |
:param bool ignore_case: whether the match should be case insensitive | |
:rtype: str | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Tiny example of 3-layer nerual network with dropout in 2nd hidden layer | |
# Output layer is linear with L2 cost (regression model) | |
# Hidden layer activation is tanh | |
import numpy as np | |
n_epochs = 100 | |
n_samples = 100 | |
n_in = 10 | |
n_hidden = 5 |
NewerOlder