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
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
*.pyc | |
a.out |
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 MNIST | |
sigmoid(z) = 1 ./ (1 + exp(-z)) | |
# load MNIST data | |
println("Loading MNIST dataset...") | |
X_train, y_train = traindata() | |
X_test, y_test = testdata() | |
y_train, y_test = y_train', y_test' | |
# mean normalization |
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 os | |
import gzip | |
import numpy as np | |
import lmdb | |
import caffe | |
import six.moves.cPickle as pickle | |
def load_data(dataset): | |
data_dir, data_file = os.path.split(dataset) |
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
$ sh leakage.sh | |
WARNING: Logging before InitGoogleLogging() is written to STDERR | |
I1004 19:15:11.682617 8069 net.cpp:58] Initializing net from parameters: | |
name: "Housing" | |
state { | |
phase: TRAIN | |
level: 0 | |
} | |
layer { | |
type: "MemoryData" |
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
julia> using Knet | |
INFO: Knet using GPU 0 | |
julia> a = randn(10, 20); k = KnetArray(a); | |
julia> k.^2 | |
10×20 Knet.KnetArray{Float64,2}: | |
NaN 3.71246 0.317756 NaN NaN NaN … NaN 0.854236 2.45753 3.18989 NaN | |
NaN 2.89357 0.410529 0.341318 8.44459 0.390959 0.123474 NaN 0.25356 NaN NaN | |
0.878611 0.0585478 NaN 0.758786 0.600756 NaN NaN NaN 0.44549 NaN 0.289267 |
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
6-element Array{Tuple{Int64,Int64},1}: | |
(100,100) | |
(500,500) | |
(100,1000) | |
(1000,100) | |
(100,60000) | |
(60000,100) | |
julia> a = randn(Float32, ds[1]...); |
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
julia> include("indexing.jl") | |
summary(a) = "4×4×4 Array{Float64,3}" | |
summary(a[:, 2, 2]) = "4-element Array{Float64,1}" | |
summary(a[:, [2, 4], 2]) = "4×2 Array{Float64,2}" | |
summary(a[:, [2, 4], [1, 3]]) = "4×2×2 Array{Float64,3}" | |
summary(a[:, [2, 4], :]) = "4×2×4 Array{Float64,3}" | |
summary(a[:, 2:4, :]) = "4×3×4 Array{Float64,3}" | |
summary(a[:, 1:2:4, :]) = "4×2×4 Array{Float64,3}" | |
summary(a) = "4×4×4 CuArray{Float64,3}" | |
summary(a[:, 2, 2]) = "4-element CuArray{Float64,1}" |
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
───────────────────────────────────────────────────────────────────────────────────── | |
Time Allocations | |
────────────────────── ─────────────────────── | |
Tot / % measured: 207s / 26.0% 99.3MiB / 55.3% | |
Section ncalls time %tot avg alloc %tot avg | |
───────────────────────────────────────────────────────────────────────────────────── | |
back1.Knet.logp 1.00k 10.2s 19.0% 10.2ms 2.94MiB 5.36% 3.01KiB | |
forw.* 1.00k 10.1s 18.8% 10.1ms 2.77MiB 5.06% 2.84KiB | |
back2.AutoGrad.broadcast#+ 1.00k 6.05s 11.3% 6.05ms 652KiB 1.16% - |
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
julia> using Knet | |
ERROR: InitError: cudart.cudaRuntimeGetVersion error 38 | |
Stacktrace: | |
[1] gpu(::Bool) at /KUFS/scratch/ikesen16/.julia/newnode/v0.6/Knet/src/gpu.jl:13 | |
[2] __init__() at /KUFS/scratch/ikesen16/.julia/newnode/v0.6/Knet/src/Knet.jl:59 | |
[3] _include_from_serialized(::String) at ./loading.jl:157 | |
[4] _require_from_serialized(::Int64, ::Symbol, ::String, ::Bool) at ./loading.jl:200 | |
[5] _require_search_from_serialized(::Int64, ::Symbol, ::String, ::Bool) at ./loading.jl:236 | |
[6] _require(::Symbol) at ./loading.jl:434 | |
[7] require(::Symbol) at ./loading.jl:398 |
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
# Get the aliases and functions | |
if [ -f ~/.bashrc ]; then | |
. ~/.bashrc | |
fi | |
export TERM=xterm | |
export SCRATCH=/scratch/users/$USER | |
export JULIA_PKGDIR=$SCRATCH/.julia | |
# modules |
OlderNewer