text

package
v0.0.0-...-1bcdb33 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 2, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NextSeqBatch

func NextSeqBatch(s *op.Scope, fileName string, seqLen, batchSize, numSeqs int64, seed int64) (curentChar, nextChar tf.Output, init *tf.Operation)

NextSeqBatch returns a pair of the curent char and the next char

func Offset

func Offset(s *op.Scope, input tf.Output) (x, y tf.Output)

Offset returns two version of input which are one element in the outer dimensions.

func OneHot

func OneHot(s *op.Scope, indices tf.Output) (embeded tf.Output)

OneHot embed chars

func ReadText

func ReadText(s *op.Scope, fileName string) (indices tf.Output)

ReadText from a file

func Split

func Split(s *op.Scope, data tf.Output, seqLen, numSeq int64) (seqs tf.Output)

Split the text into chunks

func ToCharByte

func ToCharByte(s *op.Scope, oneHot tf.Output) (charByte tf.Output)

ToCharByte converts one-hot encoding back to one byte

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL