c7dc812ea30ff28db0667ecdca11705a5b268758,examples/transformer.py,,,#,22
Before Change
}
}
// Construct the database
src_db , tgt_db = database.PairedTextDataBase(data_hparams)
// Get data minibatch, which is a dictionary:
// {
// "text": text_tensor, // text string minibatch,
After Change
src_text = text_data_batch["source_text"]
tgt_text = text_data_batch["target_text"]
encoder_output = encoder(src_text["text_ids"][:, :-1],
sequence_length=src_text["length"]-1)
// Decode
outputs, final_state, sequence_lengths = decoder(
initial_state=connector(text_database._hparams.batch_size))
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances Project Name: asyml/texar
Commit Name: c7dc812ea30ff28db0667ecdca11705a5b268758
Time: 2017-11-07
Author: shore@pku.edu.cn
File Name: examples/transformer.py
Class Name:
Method Name:
Project Name: asyml/texar
Commit Name: c8523b2dc735a1b82ca6170e6ca349defe9f77fc
Time: 2017-11-17
Author: shore@pku.edu.cn
File Name: examples/transformer.py
Class Name:
Method Name:
Project Name: uber/ludwig
Commit Name: a0a14ed743f511932db8234b2521a9eebfecde31
Time: 2020-07-09
Author: w4nderlust@gmail.com
File Name: tests/ludwig/models/modules/test_encoder.py
Class Name:
Method Name: encoder_test