Skip to content

Instantly share code, notes, and snippets.

Avatar

Alfredo Canziani Atcold

View GitHub Profile
@Atcold
Atcold / matplotlib_defaults.py
Created Aug 6, 2018
My go-to conf for matplotlib
View matplotlib_defaults.py
from matplotlib.pylab import *
style.use(['dark_background', 'bmh'])
rc('axes', facecolor='k')
rc('figure', facecolor='k')
rc('figure', figsize=(16, 4))
@Atcold
Atcold / pstree.dump chrome
Last active Feb 13, 2017
Chrome redirects stderr onto a open Terminal (http://askubuntu.com/q/882712/116218)
View pstree.dump chrome
atcold@GPU0 ~ $ pstree -psa $(pgrep -o chrome)
systemd,1 splash
└─lightdm,1240
└─lightdm,1420 --session-child 12 19
└─upstart,1917 --user
└─chrome,2805
├─cat,2812
├─cat,2813
├─chrome,2816
│ ├─chrome,2820
@Atcold
Atcold / mux showmsgs -T.log
Created Oct 7, 2015
Tmux dim-colour issue
View mux showmsgs -T.log
Terminal 0: xterm-256color [references=1, flags=0x1]:
1: acsc: (string) ``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~
0: AX: (flag) true
2: bel: (string) \007
3: blink: (string) \033[5m
4: bold: (string) \033[1m
5: civis: (string) \033[?25l
6: clear: (string) \033[H\033[2J
7: cnorm: (string) \033[?12l\033[?25h
8: colors: (number) 256
View Save Tensor's data
atcold@AlfMAC2 ~/Work/Tests/binary $ th
______ __ | Torch7
/_ __/__ ________/ / | Scientific computing for Lua.
/ / / _ \/ __/ __/ _ \ | Type ? for help
/_/ \___/_/ \__/_//_/ | https://github.com/torch
| http://torch.ch
th> torch.setdefaulttensortype('torch.FloatTensor')
[0.0012s]
View dmesg
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 3.13.0-40-generic (buildd@comet) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #69-Ubuntu SMP Thu Nov 13 17:53:56 UTC 2014 (Ubuntu 3.13.0-40.69-generic 3.13.11.10)
[ 0.000000] Command line: BOOT_IMAGE=/vmlinuz-3.13.0-40-generic root=/dev/mapper/ubuntu--vg-root ro quiet splash vt.handoff=7
[ 0.000000] KERNEL supported cpus:
[ 0.000000] Intel GenuineIntel
[ 0.000000] AMD AuthenticAMD
[ 0.000000] Centaur CentaurHauls
[ 0.000000] e820: BIOS-provided physical RAM map:
@Atcold
Atcold / tegra.txt
Last active Apr 27, 2016
luarocks install torch
View tegra.txt
ubuntu@tegra-ubuntu:~$ sudo luarocks install torch
Installing https://raw.github.com/torch/rocks/master/torch-scm-1.rockspec...
Using https://raw.github.com/torch/rocks/master/torch-scm-1.rockspec... switching to 'build' mode
Cloning into 'torch7'...
remote: Counting objects: 130, done.
remote: Compressing objects: 100% (128/128), done.
remote: Total 130 (delta 2), reused 91 (delta 1)
Receiving objects: 100% (130/130), 156.75 KiB | 0 bytes/s, done.
Resolving deltas: 100% (2/2), done.
Checking connectivity... done.
View Training log
==> Train 87
[================================ 515/515 ===================================>] ETA: 0ms | Step: 693ms
======> Time to learn 1 iteration = 357.17 sec
======> Time to train 1 sample = 5.41 ms
======> Train CE error: 3.32
======> Train accuracy: 25.648%
Conv layer 1
max L2 weights norm: 4.315349
#small weights: 1, big weights: 0
#small grads : 3888, big grads : 0
@Atcold
Atcold / comparison.lua
Last active Aug 29, 2015
Testing comparison operators in Torch with `Double` and `Cuda` *Tensor*
View comparison.lua
--------------------------------------------------------------------------------
-- This script tests the comparison operators of Torch
--------------------------------------------------------------------------------
-- It looks like there are some troubles with CudaTensor...
-- Let's find it out :)
--------------------------------------------------------------------------------
require 'cutorch'
function printStat(tensor)
You can’t perform that action at this time.