Skip to content

Instantly share code, notes, and snippets.

View Kelvinson's full-sized avatar
💭
This cat is googling and stackoverflowing~

Dong W Kelvinson

💭
This cat is googling and stackoverflowing~
  • Somewhere
View GitHub Profile
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
@radekosmulski
radekosmulski / train_on_CIFAR10.py
Created June 20, 2019 19:29
training on CIFAR10 using fastai from the command line
import fire
import fastai
from fastai.vision import *
from torch import nn
from fastai.metrics import top_k_accuracy
path = untar_data(URLs.CIFAR)
data = ImageDataBunch.from_folder(path, valid='test')
class block(nn.Module):
@AustinRochford
AustinRochford / hmc-oss-pymc3-odsc-west-2018.ipynb
Last active October 16, 2019 08:40
The HMC Revolution is Open Source - Probabilistic Programming with PyMC3
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@UsmanMaqbool
UsmanMaqbool / robotics.md
Created June 19, 2018 14:12
Robotics Installation

Installation Guide

OPENCV

OpenCV 2.4.13

To install

cd ~
@Kelvinson
Kelvinson / Install NVIDIA Driver and CUDA.md
Created April 17, 2018 22:25 — forked from wangruohui/Install NVIDIA Driver and CUDA.md
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora Linux OS
@kevinzakka
kevinzakka / data_loader.py
Last active April 19, 2024 23:42
Train, Validation and Test Split for torchvision Datasets
"""
Create train, valid, test iterators for CIFAR-10 [1].
Easily extended to MNIST, CIFAR-100 and Imagenet.
[1]: https://discuss.pytorch.org/t/feedback-on-pytorch-for-kaggle-competitions/2252/4
"""
import torch
import numpy as np
@Tushar-N
Tushar-N / pad_packed_demo.py
Last active December 27, 2022 06:35
How to use pad_packed_sequence in pytorch<1.1.0
import torch
import torch.nn as nn
from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence
seqs = ['gigantic_string','tiny_str','medium_str']
# make <pad> idx 0
vocab = ['<pad>'] + sorted(set(''.join(seqs)))
# make model
import argparse
import torch
import torch.nn as nn
from torch.autograd import Variable
from torch.utils.data import DataLoader
import torchvision
import torchvision.transforms as T
from torchvision.datasets import ImageFolder
@MaximumEntropy
MaximumEntropy / padded_rnn.py
Last active July 23, 2018 12:46
Padded RNN PyTorch
import torch
import torch.nn as nn
from torch.autograd import Variable
from torch.nn.utils.rnn import pad_packed_sequence, pack_padded_sequence
x = Variable(torch.randn(10, 20, 30)).cuda()
lens = range(10)
x = pack_padded_sequence(x, lens[::-1], batch_first=True)