def test_predict1():
 sp = SequencePattern()
 ts2s = TFLearnSeq2Seq(sp, verbose=1)
 wfn = ('test_%s' % ts2s.canonical_weights_fn(0))
 print(('using weights filename %s' % wfn))
 tf.reset_default_graph()
 (prediction, y) = ts2s.predict(Xin=range(10), weights_input_fn=wfn)
 assert len((prediction == 10))

def test_predict1 ( ) : sp = SequencePattern ( ) ts2s = TFLearnSeq2Seq ( sp , verbose = 1 ) wfn = ( 'test_%s' % ts2s . canonical_weights_fn ( 0 ) ) print ( ( 'using weights filename %s' % wfn ) ) tf . reset_default_graph ( ) ( prediction , y ) = ts2s . predict ( Xin = range ( 10 ) , weights_input_fn = wfn ) assert len ( ( prediction == 10 ) )
test simple preductions using weights just produced .