def test_train1():
 sp = SequencePattern()
 ts2s = TFLearnSeq2Seq(sp)
 ofn = ('test_%s' % ts2s.canonical_weights_fn(0))
 print(('using weights filename %s' % ofn))
 if os.path.exists(ofn):
  os.unlink(ofn)
 tf.reset_default_graph()
 ts2s.train(num_epochs=1, num_points=10000, weights_output_fn=ofn)
 assert os.path.exists(ofn)

def test_train1 ( ) : sp = SequencePattern ( ) ts2s = TFLearnSeq2Seq ( sp ) ofn = ( 'test_%s' % ts2s . canonical_weights_fn ( 0 ) ) print ( ( 'using weights filename %s' % ofn ) ) if os . path . exists ( ofn ) : os . unlink ( ofn ) tf . reset_default_graph ( ) ts2s . train ( num_epochs = 1 , num_points = 10000 , weights_output_fn = ofn ) assert os . path . exists ( ofn )
test simple training of an embedding_rnn seq2seq model .