code stringlengths 3 6.57k |
|---|
io.open(scp, "r", encoding="utf-8") |
enumerate(zip_longest(*fscps) |
zip(lines, args.scp) |
RuntimeError("Numbers of line mismatch") |
line.split(" ", 1) |
len(sps) |
keys.append(key) |
wavs.append(wav.strip() |
all(k == keys[0] for k in keys) |
format(keys) |
join("{}".format(w) |
len(fscps) |
main() |
np.loadtxt('points.txt') |
np.loadtxt('distribution.txt') |
np.zeros((802,350) |
range(350) |
range(802) |
np.zeros(10) |
range(10) |
int(round(points[i,0]) |
int(round(points[i,1]) |
range(x-11,x+12) |
range(y-11,y+12) |
open('fish_count.txt', 'w') |
range(10) |
f.write(str(s[i]) |
f.close() |
range(802) |
range(350) |
print(s) |
standard_library.install_aliases() |
BranchedActionValue(ActionValue) |
branches (list) |
__init__(self, branches, q_values_formatter=lambda x: x) |
greedy_actions(self) |
actions.append(branch.q_values.array.argmax(axis=1) |
reshape(-1, 1) |
F.hstack(actions) |
max(self) |
chosen_q_values.append(branch.max.reshape(-1, 1) |
F.hstack(chosen_q_values) |
evaluate_actions(self, actions) |
enumerate(self.branches) |
reshape(-1, 1) |
F.hstack(branch_q_values) |
params(self) |
branch_params.extend(list(branch.params) |
tuple(branch_params) |
Entry(object) |
word (or compound) |
__init__(self, db) |
__str__(self) |
__repr__(self) |
components(self) |
compound2affixes(self.word) |
len(a) |
self.db.entries.values() |
Gloss(object) |
__str__(self) |
train_acregnet_model(config) |
tf.reset_default_graph() |
tf.ConfigProto() |
tf.Session(config=tf_config) |
DataHandler.load_images(config['train_ims_file']) |
DataHandler.load_labels(config['train_lbs_file']) |
print('Loading training data...done') |
ACRegNet(sess, config, 'ACRegNet', is_train=True) |
print('Building AC-RegNet model...done') |
print('Training...') |
range(config['iterations']) |
acregnet.save(config['ckpt_dir']) |
print('Saving current AC-RegNet model...done') |
print('Training...done') |
tf.reset_default_graph() |
sess.close() |
read_config_file('./config/JSRT/ACRegNet.cfg') |
create_dir(config['ckpt_dir']) |
train_acregnet_model(config) |
TestPipeline(unittest.TestCase) |
test_using_all_processors(self) |
Pipeline('dp,pos,ner') |
nlp(sent) |
print(token.text, token.ner, token.upos, token.feats, token.head, token.deprel) |
self.assertIsNotNone(token.ner) |
self.assertTrue(token.ner in ner_labels) |
self.assertIsNotNone(token.head) |
self.assertIsNotNone(token.deprel) |
self.assertTrue(token.head in range(0, len(doc.tokens) |
self.assertTrue(token.deprel in dp_labels) |
self.assertIsNotNone(token.upos) |
self.assertTrue(token.upos in pos_labels['upos']) |
self.assertIsNotNone(token.feats) |
self.assertEqual(len(list(token.feats.keys() |
len(pos_properties[token.upos]) |
token.feats.items() |
self.assertTrue(feat in pos_properties[token.upos]) |
self.assertTrue(value in pos_labels[feat]) |
print(token.text, token.ner, token.upos, token.feats, token.head, token.deprel) |
self.assertIsNotNone(token.ner) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.