@Operator public final class Skipgram extends PrimitiveOp
| Modifier and Type | Class and Description |
|---|---|
static class |
Skipgram.Options
Optional attributes for
Skipgram |
operation| Modifier and Type | Method and Description |
|---|---|
static Skipgram |
create(Scope scope,
String filename,
Long batchSize,
Skipgram.Options... options)
Factory method to create a class to wrap a new Skipgram operation to the graph.
|
Output<Integer> |
currentEpoch()
The current epoch number.
|
Output<Integer> |
examples()
A vector of word ids.
|
Output<Integer> |
labels()
A vector of word ids.
|
static Skipgram.Options |
minCount(Long minCount) |
static Skipgram.Options |
subsample(Float subsample) |
Output<Long> |
totalWordsProcessed()
The total number of words processed so far.
|
Output<Integer> |
vocabFreq()
Frequencies of words.
|
Output<String> |
vocabWord()
A vector of words in the corpus.
|
static Skipgram.Options |
windowSize(Long windowSize) |
Output<Long> |
wordsPerEpoch()
Number of words per epoch in the data file.
|
equals, hashCode, toStringpublic static Skipgram create(Scope scope, String filename, Long batchSize, Skipgram.Options... options)
scope - current graph scopefilename - The corpus's text file name.batchSize - The size of produced batch.options - carries optional attributes valuespublic static Skipgram.Options windowSize(Long windowSize)
windowSize - The number of words to predict to the left and right of the target.public static Skipgram.Options minCount(Long minCount)
minCount - The minimum number of word occurrences for it to be included in the
vocabulary.public static Skipgram.Options subsample(Float subsample)
subsample - Threshold for word occurrence. Words that appear with higher
frequency will be randomly down-sampled. Set to 0 to disable.public Output<Integer> vocabFreq()
public Output<Long> totalWordsProcessed()
Copyright © 2015–2019. All rights reserved.