View node_gpu_exporter.py
#!/usr/bin/env python3
import time
import atexit
from collections import OrderedDict
from py3nvml import py3nvml as nv
from prometheus_client import Gauge, CollectorRegistry
from prometheus_client import write_to_textfile
View weightedsampler.py
class WeightedBatchSampler(Sampler):
def __init__(self, n_elems, batch_size,
initial_p=None, epoch_p_reset=False):
self.n_elems = n_elems
self.batch_size = batch_size
self.epoch_p_reset = epoch_p_reset
self.n_batches = math.ceil(self.n_elems / self.batch_size)
if initial_p is None:
View mtevalv13a.py
#!/usr/bin/env python3
import re
import math
import argparse
from collections import defaultdict
LOG_2 = math.log(2)
###################################################################################
View gist:ec91302129ad67421955e93925fb98ef
adam-512emb-1000lstm-wdecay-feature-reshape.sampling Bleu_1: 0.46259 Bleu_2: 0.27595 Bleu_3: 0.16279 Bleu_4: 0.09660 CIDEr: 0.22156 METEOR: 0.22565 ROUGE_L: 0.33607
adam-512emb-1000lstm-feature-reshape.sampling Bleu_1: 0.45442 Bleu_2: 0.26771 Bleu_3: 0.15705 Bleu_4: 0.09146 CIDEr: 0.19169 METEOR: 0.21855 ROUGE_L: 0.32499
adam-512emb-1000lstm-wdecay-feature-reshape.beam12.1best Bleu_1: 0.45167 Bleu_2: 0.26816 Bleu_3: 0.15995 Bleu_4: 0.09787 CIDEr: 0.26480 METEOR: 0.24464 ROUGE_L: 0.34140
adam-512emb-1000lstm-feature-reshape-noprevctx.sampling Bleu_1: 0.44216 Bleu_2: 0.25580 Bleu_3: 0.14835 Bleu_4: 0.08502 CIDEr: 0.18997 METEOR: 0.22077 ROUGE_L: 0.32038
adam-512emb-1000lstm-feature-reshape.beam12.1best Bleu_1: 0.44151 Bleu_2: 0.25829 Bleu_3: 0.15098 Bleu_4: 0.09008 CIDEr: 0.24039 METEOR: 0.23844 ROUGE_L: 0.33360
adam-512emb-1000lstm-feature-reshape-noprevctx.beam12.1best Bleu_1: 0.43102 Bleu_2: 0.2487
View weights.txt
Wemb_enc, -0.05387, 0.05577
Wemb_dec, -0.05280, 0.05521
encoder_W, -0.05016, 0.04749
encoder_b, 0.00000, 0.00000
encoder_U, -0.17179, 0.16453
encoder_Wx, -0.04784, 0.04707
encoder_bx, 0.00000, 0.00000
encoder_Ux, -0.15236, 0.15887
encoder_r_W, -0.04918, 0.04668
encoder_r_b, 0.00000, 0.00000
View build_dictionary.lua
local argparse = require "argparse"
local moses = require "moses"
local parser = argparse("build_dictionary", "example")
parser:argument("input", "Input text file"):args('+')
parser:option('-o --output', 'Output directory', '.')
parser:option('-m --minfreq', 'Filter out words occuring < m times.', 0)
local args = parser:parse()
View patience.py
losses = [57.4, 50.7, 40.9, 39.6 ,37.9, 37.5, 36.3, 35.7, 36.5, 35.13, 36.33, 34.37, 34.78, 34.67, 34.44, 35.2, 35.66, 32.47, 34.6, 34.7, 35.14, 34.5]
import numpy as np
vhist = []
patience = 10
bad_c = 0
use_bleu = False
for i in range(len(losses)):
loss = losses[i]
View testex.py
#!/usr/bin/env python
import sys
import time
def model():
print "model"
try:
while 1:
print "loop"
time.sleep(2)
View losses.py
#!/usr/bin/env python
import sys
import numpy as np
import time
import theano
import theano.tensor as T
View index.py
# pp: (batch, sequence_step, target vocabulary probabilities)
# yy: (batch, sequence_step's true label)
# Soru: pp[yy] gibi dogru yerlerden dogru olasiliklari nasi cekebilirim?
In [211]: pp.shape
Out[211]: (256, 33, 20004)
In [212]: yy.shape
Out[212]: (256, 33)