#NEWLINE# def embed( self , feed ) : #NEWLINE# #INDENT# ' Returns the embedding of the input. ' #NEWLINE# feed = Feed . from_any ( feed ) #NEWLINE# y = np . empty ( self . output_shape ( feed . x . shape ) ) #NEWLINE# offset = 0 #NEWLINE# for x_batch in feed . batches ( ) : #NEWLINE# #INDENT# y_batch = np . array ( self . _embed_batch ( x_batch ) ) #NEWLINE# batch_size = y_batch . shape [ 0 ] #NEWLINE# y [ offset : ( feed + batch_size ) , ... ] = y_batch #NEWLINE# offset += batch_size #NEWLINE# #UNINDENT# return y