コード例 #1
0
 def setUp(self):
   create_data()
   # defining some general parameters for all tests
   self.params = {
     'src_vocab_file': "./toy_data/vocab/source.txt",
     'tgt_vocab_file': "./toy_data/vocab/target.txt",
     'source_file': "./toy_data/train/source.txt",
     'target_file': "./toy_data/train/target.txt",
     'shuffle': True,
     'delimiter': " ",
     'pad_vocab_to_eight': True,
   }
コード例 #2
0
 def setUp(self):
   create_data()
   batch_size = 2
   self.params = {
     'src_vocab_file': "./toy_data/vocab/source.txt",
     'tgt_vocab_file': "./toy_data/vocab/target.txt",
     'source_file': "./toy_data/train/source.txt",
     'target_file': "./toy_data/train/target.txt",
     'shuffle': True,
     'batch_size': batch_size,
     'max_length': 56,
     'repeat': False,
     'delimiter': ' ',
     'map_parallel_calls': 1,
     'prefetch_buffer_size': 1,
   }
コード例 #3
0
ファイル: text2text_test.py プロジェクト: fotwo/OpenSeq2Seq
 def setUp(self):
   create_data()
   batch_size = 2
   self.params = {
     'src_vocab_file': "./toy_data/vocab/source.txt",
     'tgt_vocab_file': "./toy_data/vocab/target.txt",
     'source_file': "./toy_data/train/source.txt",
     'target_file': "./toy_data/train/target.txt",
     'shuffle': True,
     'batch_size': batch_size,
     'max_length': 56,
     'repeat': False,
     'delimiter': ' ',
     'map_parallel_calls': 1,
     'prefetch_buffer_size': 1,
     'mode': 'train',
   }
コード例 #4
0
 def setUp(self):
     create_data(train_corpus_size=1000, data_path="tmp1")
     batch_size = 2
     self.params = {
         'src_vocab_file': "tmp1/vocab/source.txt",
         'tgt_vocab_file': "tmp1/vocab/target.txt",
         'source_file': "tmp1/train/source.txt",
         'target_file': "tmp1/train/target.txt",
         'shuffle': True,
         'batch_size': batch_size,
         'max_length': 56,
         'repeat': False,
         'delimiter': ' ',
         'map_parallel_calls': 1,
         'prefetch_buffer_size': 1,
         'mode': 'train',
     }
コード例 #5
0
ファイル: text2text_test.py プロジェクト: fotwo/OpenSeq2Seq
 def setUp(self):
   print("Setting Up BasicSeq2SeqWithAttention on Horovod")
   create_data(train_corpus_size=500)
コード例 #6
0
 def setUp(self):
     print("Setting Up BasicSeq2SeqWithAttention on Horovod")
     create_data(train_corpus_size=500)
コード例 #7
0
 def setUp(self):
     print("Setting Up BasicSeq2SeqWithAttention")
     create_data(train_corpus_size=500, data_path='tmp2')