Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/boyangumn/DCN-New
/ functions
Functions
173 in github.com/boyangumn/DCN-New
⨍
Functions
173
◇
Types & classes
21
↓ 12 callers
Function
numpy_floatX
(data)
Theano_example_code/lstm.py:26
↓ 11 callers
Function
time_test
(m, l, idx, f, **kwargs)
Theano_example_code/test.py:137
↓ 10 callers
Function
load_data
Loads the dataset :type dataset: string :param dataset: the path to the dataset (here MNIST)
Theano_example_code/logistic_sgd.py:175
↓ 8 callers
Method
errors
Return a float representing the number of errors in the minibatch over the total number of examples of the minibatch :type y: theano.
Theano_example_code/logistic_cg.py:120
↓ 8 callers
Method
load
(self, folder)
Theano_example_code/rnnslu.py:259
↓ 8 callers
Function
ortho_weight
(ndim)
Theano_example_code/lstm.py:132
↓ 7 callers
Function
_p
(pp, name)
Theano_example_code/lstm.py:86
↓ 6 callers
Function
pred_error
Just compute the error f_pred: Theano fct computing the prediction prepare_data: usual prepare_data for that dataset.
Theano_example_code/lstm.py:429
↓ 6 callers
Method
save
(self, folder)
Theano_example_code/rnnslu.py:254
↓ 5 callers
Method
load
(cls, path_img, path_lbl)
mnist_loader.py:52
↓ 5 callers
Method
negative_log_likelihood
Return the negative log-likelihood of the prediction of this model under a given target distribution. .. math:: \frac{1}
Theano_example_code/logistic_cg.py:103
↓ 5 callers
Function
shared_normal
Initialize a matrix shared variable with normally distributed elements.
Theano_example_code/rnnrbm.py:81
↓ 5 callers
Function
tile_raster_images
Transform an array with one flattened image per row, into an array in which images are reshaped and layed out like tiles on a floor. Thi
Theano_example_code/utils.py:20
↓ 4 callers
Function
_slice
(_x, n, dim)
Theano_example_code/lstm.py:169
↓ 4 callers
Function
acc
Calculating the clustering accuracy. The predicted result must have the same number of clusters as the ground truth. ypred: 1-D numpy ve
cluster_acc.py:11
↓ 4 callers
Method
free_energy
Function to compute the free energy
Theano_example_code/rbm.py:130
↓ 4 callers
Method
get_cost_updates
This function computes the cost and the updates for one trainng step of the dA
Theano_example_code/dA.py:233
↓ 4 callers
Function
get_minibatches_idx
Used to shuffle the dataset at each iteration.
Theano_example_code/lstm.py:30
↓ 4 callers
Method
get_output
(self)
multi_layer_km.py:341
↓ 4 callers
Function
grab_data
(path, dictionary)
Theano_example_code/imdb_preprocess.py:80
↓ 3 callers
Function
compare
(x, y)
Theano_example_code/test.py:283
↓ 3 callers
Function
contextwin
win :: int corresponding to the size of the window given a list of indexes composing a sentence l :: array containing the word indexes
Theano_example_code/rnnslu.py:45
↓ 3 callers
Function
do_tests
()
Theano_example_code/test.py:151
↓ 3 callers
Method
get_hidden_values
Computes the values of the hidden layer
multi_layer_km.py:167
↓ 3 callers
Function
len_argsort
(seq)
Theano_example_code/imdb.py:155
↓ 3 callers
Function
prepare_data
Create the matrices from the datasets. This pad each sequence to the same lenght: the lenght of the longuest sequence or maxlen. if maxl
Theano_example_code/imdb.py:12
↓ 3 callers
Function
remove_unk
(x)
Theano_example_code/imdb.py:144
↓ 3 callers
Method
sample_h_given_v
This function infers state of hidden units given visible units
Theano_example_code/rbm.py:151
↓ 3 callers
Function
shared_dataset
Function that loads the dataset into shared variables The reason we store our dataset in shared variables is to allow Theano to copy
Theano_example_code/logistic_sgd.py:222
↓ 3 callers
Function
shared_zeros
Initialize a vector shared variable with zero elements.
Theano_example_code/rnnrbm.py:88
↓ 3 callers
Function
train_fn
(theta_value)
Theano_example_code/logistic_cg.py:239
↓ 3 callers
Function
unzip
When we pickle the model. Needed for the GPU stuff.
Theano_example_code/lstm.py:66
↓ 2 callers
Function
build_rbm
Construct a k-step Gibbs chain starting at v for an RBM. v : Theano vector or matrix If a matrix, multiple chains will be run in parallel
Theano_example_code/rnnrbm.py:30
↓ 2 callers
Function
conlleval
INPUT: p :: predictions g :: groundtruth w :: corresponding words OUTPUT: filename :: name of the file where the predictions
Theano_example_code/rnnslu.py:80
↓ 2 callers
Method
draw
Returns a new position obtained after `n_steps` of HMC simulation. Parameters ---------- kwargs: dictionary
Theano_example_code/hmc/hmc.py:400
↓ 2 callers
Method
errors
Return a float representing the number of errors in the minibatch over the total number of examples of the minibatch ; zero one loss o
Theano_example_code/logistic_sgd.py:150
↓ 2 callers
Function
evaluate_lenet5
Demonstrates lenet on MNIST dataset :type learning_rate: float :param learning_rate: learning rate used (factor for the stochastic
Theano_example_code/convolutional_mlp.py:120
↓ 2 callers
Function
free_energy
(v)
Theano_example_code/rnnrbm.py:74
↓ 2 callers
Method
generate
Generate a sample sequence, plot the resulting piano-roll and save it as a MIDI file. filename : string A MIDI file will
Theano_example_code/rnnrbm.py:267
↓ 2 callers
Method
get_corrupted_input
This function keeps ``1-corruption_level`` entries of the inputs the same and zero-out randomly selected subset of size ``coruption_level``
Theano_example_code/dA.py:196
↓ 2 callers
Function
get_layer
(name)
Theano_example_code/lstm.py:127
↓ 2 callers
Method
get_network_reconst
(self)
multi_layer_km.py:345
↓ 2 callers
Method
get_reconstructed_input
Computes the reconstructed input given the values of the hidden layer
multi_layer_km.py:175
↓ 2 callers
Function
gibbs_step
(v)
Theano_example_code/rnnrbm.py:57
↓ 2 callers
Function
hamiltonian
Returns the Hamiltonian (sum of potential and kinetic energy) for the given velocity and position. Parameters ---------- pos: th
Theano_example_code/hmc/hmc.py:33
↓ 2 callers
Function
init_cluster
(data)
multi_layer_km.py:984
↓ 2 callers
Function
recurrence
(v_t, u_tm1)
Theano_example_code/rnnrbm.py:148
↓ 2 callers
Method
sample_v_given_h
This function infers state of visible units given hidden units
Theano_example_code/rbm.py:179
↓ 2 callers
Function
test_SdC
:type Init: string :param Init: a string contains the filename of a saved network, the saved network can be loaded to initialize
multi_layer_km.py:787
↓ 2 callers
Function
tokenize
(sentences)
Theano_example_code/imdb_preprocess.py:28
↓ 1 callers
Function
atisfold
(fold)
Theano_example_code/rnnslu.py:68
↓ 1 callers
Function
batch_km
Function to perform a KMeans update on a batch of data, center is the centroid from last iteration.
multi_layer_km.py:707
↓ 1 callers
Function
build_dict
(path)
Theano_example_code/imdb_preprocess.py:40
↓ 1 callers
Method
build_finetune_functions
Generates a function `train` that implements one step of finetuning, a function `validate` that computes the error on a batch from the
multi_layer_km.py:448
↓ 1 callers
Method
build_finetune_functions
Generates a function `train` that implements one step of finetuning, a function `validate` that computes the error on a batch from the
Theano_example_code/DBN.py:189
↓ 1 callers
Method
build_finetune_functions
Generates a function `train` that implements one step of finetuning, a function `validate` that computes the error on a batch from the
Theano_example_code/SdA.py:234
↓ 1 callers
Function
build_model
(tparams, options)
Theano_example_code/lstm.py:367
↓ 1 callers
Function
build_rnnrbm
Construct a symbolic RNN-RBM and initialize parameters. n_visible : integer Number of visible units. n_hidden : integer Numbe
Theano_example_code/rnnrbm.py:93
↓ 1 callers
Function
cg_optimization_mnist
Demonstrate conjugate gradient optimization of a log-linear model This is demonstrated on MNIST. :type n_epochs: int :param n_epochs: nu
Theano_example_code/logistic_cg.py:144
↓ 1 callers
Function
download
download the corresponding atis file from http://www-etud.iro.umontreal.ca/~mesnilgr/atis/
Theano_example_code/rnnslu.py:111
↓ 1 callers
Function
dropout_layer
(state_before, use_noise, trng)
Theano_example_code/lstm.py:76
↓ 1 callers
Method
finetune_cost_updates
(self, center, mu, learning_rate)
multi_layer_km.py:354
↓ 1 callers
Method
get_cost_updates
This function computes the cost and the updates for one trainng step of the dA
multi_layer_km.py:182
↓ 1 callers
Method
get_cost_updates
This functions implements one step of CD-k or PCD-k :param lr: learning rate used to train the RBM :param persistent: None for CD. F
Theano_example_code/rbm.py:209
↓ 1 callers
Method
get_cost_updates
This function computes the cost and the updates for one trainng step of the cA
Theano_example_code/cA.py:196
↓ 1 callers
Function
get_dataset
(name)
Theano_example_code/lstm.py:54
↓ 1 callers
Function
get_dataset_file
Look for it as if it was a full path, if not, try local file, if not try in the data directory. Download dataset if it is not present
Theano_example_code/imdb.py:54
↓ 1 callers
Method
get_hidden_values
Computes the values of the hidden layer
Theano_example_code/dA.py:222
↓ 1 callers
Method
get_hidden_values
Computes the values of the hidden layer
Theano_example_code/cA.py:175
↓ 1 callers
Method
get_jacobian
Computes the jacobian of the hidden layer with respect to the input, reshapes are necessary for broadcasting the element-wise product
Theano_example_code/cA.py:179
↓ 1 callers
Function
get_perf
run conlleval.pl perl script to obtain precision/recall and F1 score
Theano_example_code/rnnslu.py:120
↓ 1 callers
Method
get_pseudo_likelihood_cost
Stochastic approximation to the pseudo-likelihood
Theano_example_code/rbm.py:293
↓ 1 callers
Method
get_reconstructed_input
Computes the reconstructed input given the values of the hidden layer
Theano_example_code/dA.py:226
↓ 1 callers
Method
get_reconstructed_input
Computes the reconstructed input given the values of the hidden layer
Theano_example_code/cA.py:189
↓ 1 callers
Method
get_reconstruction_cost
Approximation to the reconstruction error Note that this function requires the pre-sigmoid activation as input. To understand why th
Theano_example_code/rbm.py:322
↓ 1 callers
Function
hmc_move
This function performs one-step of Hybrid Monte-Carlo sampling. We start by sampling a random velocity from a univariate Gaussian distributio
Theano_example_code/hmc/hmc.py:177
↓ 1 callers
Function
hmc_updates
This function is executed after `n_steps` of HMC sampling (`hmc_move` function). It creates the updates dictionary used by the `simulate` func
Theano_example_code/hmc/hmc.py:231
↓ 1 callers
Function
init_params
Global (not LSTM) parameter. For the embeding and the classifier.
Theano_example_code/lstm.py:90
↓ 1 callers
Function
init_tparams
(params)
Theano_example_code/lstm.py:120
↓ 1 callers
Function
instNetwork
Instantiate the network kwargs contains all the input arguments of test_SdC
multi_layer_km.py:875
↓ 1 callers
Function
kinetic_energy
Returns the kinetic energy associated with the given velocity and mass of 1. Parameters ---------- vel: theano matrix Symboli
Theano_example_code/hmc/hmc.py:15
↓ 1 callers
Function
load_data
Loads the dataset :type path: String :param path: The path to the dataset (here IMDB) :type n_words: int :param n_words: The number o
Theano_example_code/imdb.py:82
↓ 1 callers
Function
load_data_shared
Load the dataset and save it as shared-variable to be used by Theano
multi_layer_km.py:645
↓ 1 callers
Function
load_params
(path, params)
Theano_example_code/lstm.py:110
↓ 1 callers
Function
main
()
Theano_example_code/imdb_preprocess.py:98
↓ 1 callers
Function
main
(param=None)
Theano_example_code/rnnslu.py:265
↓ 1 callers
Function
metropolis_hastings_accept
Performs a Metropolis-Hastings accept-reject move. Parameters ---------- energy_prev: theano vector Symbolic theano tensor w
Theano_example_code/hmc/hmc.py:58
↓ 1 callers
Method
negative_log_likelihood
Return the mean of the negative log-likelihood of the prediction of this model under a given target distribution. .. math::
Theano_example_code/logistic_sgd.py:118
↓ 1 callers
Method
pretraining_functions
Generates a list of functions, each of them implementing one step in trainnig the dA corresponding to the layer with same index. The
multi_layer_km.py:394
↓ 1 callers
Method
pretraining_functions
Generates a list of functions, for performing one step of gradient descent at a given layer. The function will require as input the mi
Theano_example_code/DBN.py:139
↓ 1 callers
Method
pretraining_functions
Generates a list of functions, each of them implementing one step in trainnig the dA corresponding to the layer with same index. The
Theano_example_code/SdA.py:183
↓ 1 callers
Method
propdown
This function propagates the hidden units activation downwards to the visible units Note that we return also the pre_sigmoid_activati
Theano_example_code/rbm.py:165
↓ 1 callers
Method
propup
This function propagates the visible units activation upwards to the hidden units Note that we return also the pre-sigmoid activation
Theano_example_code/rbm.py:137
↓ 1 callers
Function
sampler_on_nd_gaussian
(sampler_cls, burnin, n_samples, dim=10)
Theano_example_code/hmc/test_hmc.py:15
↓ 1 callers
Function
scale_to_unit_interval
Scales all values in the ndarray ndar to be between 0 and 1
Theano_example_code/utils.py:12
↓ 1 callers
Function
sgd_optimization_mnist
Demonstrate stochastic gradient descent optimization of a log-linear model This is demonstrated on MNIST. :type learning_rate: floa
Theano_example_code/logistic_sgd.py:256
↓ 1 callers
Function
shared_dataset
Function that loads the dataset into shared variables The reason we store our dataset in shared variables is to allow Theano to copy
multi_layer_km.py:680
↓ 1 callers
Function
shuffle
lol :: list of list as input seed :: seed the shuffling shuffle inplace each list in the same order
Theano_example_code/rnnslu.py:32
↓ 1 callers
Function
simulate_dynamics
Return final (position, velocity) obtained after an `n_steps` leapfrog updates, using Hamiltonian dynamics. Parameters ----------
Theano_example_code/hmc/hmc.py:83
↓ 1 callers
Function
test_DBN
Demonstrates how to train and test a Deep Belief Network. This is demonstrated on MNIST. :type finetune_lr: float :param finetune_l
Theano_example_code/DBN.py:279
next →
1–100 of 173, ranked by callers