@Deprecated public class GloveWeightLookupTable<T extends SequenceElement> extends InMemoryLookupTable<T>
Modifier and Type | Class and Description |
---|---|
static class |
GloveWeightLookupTable.Builder<T extends SequenceElement>
Deprecated.
|
InMemoryLookupTable.WeightIterator
Constructor and Description |
---|
GloveWeightLookupTable(VocabCache<T> vocab,
int vectorLength,
boolean useAdaGrad,
double lr,
org.nd4j.linalg.api.rng.Random gen,
double negative,
double xMax,
double maxCount)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
org.nd4j.linalg.api.ndarray.INDArray |
getBias()
Deprecated.
|
org.nd4j.linalg.learning.AdaGrad |
getBiasAdaGrad()
Deprecated.
|
double |
getMaxCount()
Deprecated.
|
org.nd4j.linalg.learning.AdaGrad |
getWeightAdaGrad()
Deprecated.
|
double |
getxMax()
Deprecated.
|
void |
iterateSample(T w1,
T w2,
java.util.concurrent.atomic.AtomicLong nextRandom,
double alpha)
Deprecated.
Iterate on the given 2 vocab words
|
double |
iterateSample(T w1,
T w2,
double score)
Deprecated.
glove iteration
|
static GloveWeightLookupTable |
load(java.io.InputStream is,
VocabCache<? extends SequenceElement> vocab)
Deprecated.
Load a glove model from an input stream.
|
void |
resetWeights()
Deprecated.
Reset the weights of the cache
|
void |
resetWeights(boolean reset)
Deprecated.
Clear out all weights regardless
|
void |
setBias(org.nd4j.linalg.api.ndarray.INDArray bias)
Deprecated.
|
void |
setMaxCount(double maxCount)
Deprecated.
|
void |
setxMax(double xMax)
Deprecated.
|
consume, getCodes, getExpTable, getGradient, getLr, getNegative, getSyn0, getSyn1, getSyn1Neg, getTable, getVocab, getVocabCache, getWeights, initAdaGrad, initExpTable, initNegative, isUseAdaGrad, iterate, layerSize, loadCodes, makeTable, plotVocab, plotVocab, plotVocab, plotVocab, putCode, putVector, setCodes, setExpTable, setLearningRate, setLr, setNegative, setSyn0, setSyn1, setSyn1Neg, setTable, setUseAdaGrad, setUseHS, setVectorLength, setVocab, toString, vector, vectors
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getTableId, setTableId
public GloveWeightLookupTable(VocabCache<T> vocab, int vectorLength, boolean useAdaGrad, double lr, org.nd4j.linalg.api.rng.Random gen, double negative, double xMax, double maxCount)
public void resetWeights(boolean reset)
WeightLookupTable
resetWeights
in interface WeightLookupTable<T extends SequenceElement>
resetWeights
in class InMemoryLookupTable<T extends SequenceElement>
public void resetWeights()
resetWeights
in interface WeightLookupTable<T extends SequenceElement>
resetWeights
in class InMemoryLookupTable<T extends SequenceElement>
public double iterateSample(T w1, T w2, double score)
w1
- the first wordw2
- the second wordscore
- the weight learned for the particular co occurrencespublic org.nd4j.linalg.learning.AdaGrad getWeightAdaGrad()
public org.nd4j.linalg.learning.AdaGrad getBiasAdaGrad()
public static GloveWeightLookupTable load(java.io.InputStream is, VocabCache<? extends SequenceElement> vocab) throws java.io.IOException
is
- the input stream to read from for the weightsvocab
- the vocab for the lookuptablejava.io.IOException
- if one occurspublic void iterateSample(T w1, T w2, java.util.concurrent.atomic.AtomicLong nextRandom, double alpha)
InMemoryLookupTable
iterateSample
in interface WeightLookupTable<T extends SequenceElement>
iterateSample
in class InMemoryLookupTable<T extends SequenceElement>
w1
- the first word to iterate onw2
- the second word to iterate onnextRandom
- next random for samplingalpha
- the alpha to use for learningpublic double getxMax()
public void setxMax(double xMax)
public double getMaxCount()
public void setMaxCount(double maxCount)
public org.nd4j.linalg.api.ndarray.INDArray getBias()
public void setBias(org.nd4j.linalg.api.ndarray.INDArray bias)