Skip to content

Instantly share code, notes, and snippets.

View skaae's full-sized avatar

Søren Kaae Sønderby skaae

View GitHub Profile
@skaae
skaae / shell_matlab.sh
Created June 17, 2014 07:46
Launch script for matlab with GPU
#!/bin/sh
#
# stdout/stderr redirection
#PBS -N NAME_OF_JOB1
#PBS -o $PBS_JOBNAME.$PBS_JOBID.out
#PBS -e $PBS_JOBNAME.$PBS_JOBID.err
#PBS -l nodes=1:gpus=1
# Execute the job from the current working directory
cd $PBS_O_WORKDIR
@skaae
skaae / MyConfusionMatrix.lua
Last active December 15, 2015 21:15
Updated Confusion Class
--[[ A Confusion Matrix class
Example:
conf = optim.ConfusionMatrix( {'cat','dog','person'} ) -- new matrix
conf:zero() -- reset matrix
for i = 1,N do
conf:add( neuralnet:forward(sample), label ) -- accumulate errors
end
print(conf) -- print matrix
@skaae
skaae / gist:b1ed48fe958b6c3d1041
Created January 7, 2015 20:48
confusion matrix
--[[ A Confusion Matrix class
Example:
conf = optim.ConfusionMatrix( {'cat','dog','person'} ) -- new matrix
conf:zero() -- reset matrix
for i = 1,N do
conf:add( neuralnet:forward(sample), label ) -- accumulate errors
end
print(conf) -- print matrix
class LSTMLayer(Layer):
'''
A long short-term memory (LSTM) layer. Includes "peephole connections" and
forget gate. Based on the definition in [#graves2014generating]_, which is
the current common definition.
:references:
.. [#graves2014generating] Alex Graves, "Generating Sequences With
Recurrent Neural Networks".
class LSTMLayer(Layer):
'''
A long short-term memory (LSTM) layer. Includes "peephole connections" and
forget gate. Based on the definition in [#graves2014generating]_, which is
the current common definition.
:references:
.. [#graves2014generating] Alex Graves, "Generating Sequences With
Recurrent Neural Networks".
'''
class LSTMLayer(Layer):
'''
A long short-term memory (LSTM) layer. Includes "peephole connections" and
forget gate. Based on the definition in [#graves2014generating]_, which is
the current common definition. Gate names are taken from [#zaremba2014],
figure 1.
:references:
.. [#graves2014generating] Alex Graves, "Generating Sequences With
Recurrent Neural Networks".
class LSTMLayer(Layer):
'''
A long short-term memory (LSTM) layer. Includes "peephole connections" and
forget gate. Based on the definition in [#graves2014generating]_, which is
the current common definition. Gate names are taken from [#zaremba2014],
figure 1.
:references:
.. [#graves2014generating] Alex Graves, "Generating Sequences With
Recurrent Neural Networks".
class BidirectionalLSTMLayer(Layer):
'''
A long short-term memory (LSTM) layer. Includes "peephole connections" and
forget gate. Based on the definition in [#graves2014generating]_, which is
the current common definition. Gate names are taken from [#zaremba2014],
figure 1.
:references:
.. [#graves2014generating] Alex Graves, "Generating Sequences With
Recurrent Neural Networks".
Function profiling
==================
Message: experiment.py:196
Time in 12 calls to Function.__call__: 8.222084e+01s
Time in Function.fn.__call__: 8.221798e+01s (99.997%)
Time in thunks: 8.196062e+01s (99.684%)
Total compile time: 2.509097e+02s
Number of Apply nodes: 1214
Theano Optimizer time: 1.675486e+02s
Theano validate time: 1.319681e+00s
Function profiling
==================
Message: experiment.py:196
Time in 1 calls to Function.__call__: 7.953641e+00s
Time in Function.fn.__call__: 7.953413e+00s (99.997%)
Time in thunks: 7.929524e+00s (99.697%)
Total compile time: 1.766550e+02s
Number of Apply nodes: 1214
Theano Optimizer time: 1.688680e+02s