Skip to content

Instantly share code, notes, and snippets.

View skrish13's full-sized avatar

Sri Krishna skrish13

View GitHub Profile
@skrish13
skrish13 / removing_conda.md
Last active January 4, 2017 19:20
Starting of small files containing repetitive processes one might run into while using Python, Bash :P
  • Removing conda safely
    • rm -rf /path/to/anaconda/
    • vim ~/.bashrc
    • #comment out or delete - the line where conda was added to path
    • source ~/.bashrc
    • #now enjoy! :)
@skrish13
skrish13 / Replicate_R_CNN.txt
Created December 21, 2016 18:20
Log of the R console for replicating #3736(dmlc/mxnet)
# Clean workspace
> rm(list=ls())
>
> # Load MXNet
> require(mxnet)
>
> # Loading data and set up
> #-------------------------------------------------------------------------------
>
> # Load train and test datasets

List of to-do's after installing GNOME:

  • Extensions
    • Dash to Dock
    • Pixel Saver
    • Places indicator
    • Workspace indicator
    • Suspend icon in Menu
  • Extra Apps
    • VLC
  • Thunderbird
@skrish13
skrish13 / lookup.md
Last active April 13, 2017 23:19
Few recurring issues while installing a new Linux OS
@skrish13
skrish13 / .theanorc
Created January 4, 2017 19:10
Standard .theanorc which I use
[nvcc]
optimizer_including=cudnn
[cuda]
root = /usr/local/cuda/bin
[global]
floatX = float32
device = gpu0
exception_verbosity = high
@skrish13
skrish13 / DL_lookup.md
Last active January 4, 2017 19:17
Few useful procedures followed while setting up a linux system for Deep Learning purposes..
  • Installing CUDA

    • Most worked method - .deb file (of your distro) from the site
    • Installing it on a tty
    • Has problems with Mint as such
  • Setting CUDA Paths

    • write in .bashrc:
      • #CUDA Paths
      • export PATH=/usr/local/cuda-8.0/bin:$PATH
  • export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64:/usr/local/cuda-8.0/lib

@skrish13
skrish13 / theano_gpu_test.py
Created January 4, 2017 21:22
Standard code to verify usage of GPU
from theano import function, config, shared, sandbox
import theano.tensor as T
import numpy
import time
vlen = 10 * 30 * 768 # 10 x #cores x # threads per core
iters = 1000
rng = numpy.random.RandomState(22)
x = shared(numpy.asarray(rng.rand(vlen), config.floatX))
@skrish13
skrish13 / L2L.md
Created March 28, 2017 09:26
Links to links about different books/tuts/conferences about Machine Learning and Deep Learning in general
@skrish13
skrish13 / tut-dcase.md
Last active June 11, 2024 08:12
Confusions regarding TUT and DCASE datasets
@skrish13
skrish13 / save_checkpoint.py
Created August 2, 2017 05:12
PyTorch model/optim checkpointing code snippet
import shutil, torch
def save_checkpoint(state, is_best, filename='checkpoint.pth.tar'):
torch.save(state, filename)
if is_best:
shutil.copyfile(filename, 'model_best.pth.tar')
save_checkpoint({
'epoch': epoch + 1,
'arch': args.arch,
'state_dict': model.state_dict(),