Skip to content

Commit 2841a16

Browse files
AngledLuffaStanford NLP
authored and
Stanford NLP
committed
Update ejml 32 -> 38
1 parent e8b8f33 commit 2841a16

20 files changed

+44
-44
lines changed

doc/corenlp/pom-full.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,19 +99,19 @@
9999
<dependency>
100100
<groupId>org.ejml</groupId>
101101
<artifactId>ejml-core</artifactId>
102-
<version>0.32</version>
102+
<version>0.38</version>
103103
</dependency>
104104

105105
<dependency>
106106
<groupId>org.ejml</groupId>
107107
<artifactId>ejml-ddense</artifactId>
108-
<version>0.32</version>
108+
<version>0.38</version>
109109
</dependency>
110110

111111
<dependency>
112112
<groupId>org.ejml</groupId>
113113
<artifactId>ejml-simple</artifactId>
114-
<version>0.32</version>
114+
<version>0.38</version>
115115
</dependency>
116116

117117
<dependency>

doc/lexparser/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,19 @@
4343
<dependency>
4444
<groupId>org.ejml</groupId>
4545
<artifactId>ejml-core</artifactId>
46-
<version>0.32</version>
46+
<version>0.38</version>
4747
</dependency>
4848

4949
<dependency>
5050
<groupId>org.ejml</groupId>
5151
<artifactId>ejml-ddense</artifactId>
52-
<version>0.32</version>
52+
<version>0.38</version>
5353
</dependency>
5454

5555
<dependency>
5656
<groupId>org.ejml</groupId>
5757
<artifactId>ejml-simple</artifactId>
58-
<version>0.32</version>
58+
<version>0.38</version>
5959
</dependency>
6060

6161
<dependency>

lib/LIBRARY-LICENSES

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ A compatible JSON library is a component of Java EE (JSR 374).
55

66
-----------------------------------------------------------------
77

8-
ejml-0.32.jar
8+
ejml-0.38.jar
99

1010
URL: http://ejml.org/
1111

lib/README

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -286,10 +286,10 @@ LAST UPDATE: 2016-07-24
286286
LAST UPDATE BY: Christopher Manning
287287

288288
-----------------------------------------------------------------------
289-
ejml-core-0.32.jar
290-
ORIGINAL JAR NAME: ejml-core-0.32.jar
291-
VERSION: 0.32
292-
RELEASE DATE: 2017-09-18
289+
ejml-core-0.38.jar
290+
ORIGINAL JAR NAME: ejml-core-0.38.jar
291+
VERSION: 0.38
292+
RELEASE DATE: 2019-03-14
293293
SOURCE AVAILABLE: yes
294294
DESCRIPTION: Another matrix library for Java, perhaps fastest for medium
295295
size vectors and matrices in 2012. Otherwise, it's ojAlgo.
@@ -298,14 +298,14 @@ URL: http://ejml.org/
298298
USED BY: Used in deep learning, especially RNN parser and sentiment
299299
Needed by CoreNLP distributions.
300300

301-
LAST UPDATE: 2017-11-30
302-
LAST UPDATE BY: Christopher Manning
301+
LAST UPDATE: 2019-07-29
302+
LAST UPDATE BY: John Bauer
303303

304304
-----------------------------------------------------------------------
305-
ejml-ddense-0.32.jar
306-
ORIGINAL JAR NAME: ejml-ddense-0.32.jar
307-
VERSION: 0.32
308-
RELEASE DATE: 2017-09-18
305+
ejml-ddense-0.38.jar
306+
ORIGINAL JAR NAME: ejml-ddense-0.38.jar
307+
VERSION: 0.38
308+
RELEASE DATE: 2019-03-14
309309
SOURCE AVAILABLE: yes
310310
DESCRIPTION: Another matrix library for Java, perhaps fastest for medium
311311
size vectors and matrices in 2012. Otherwise, it's ojAlgo.
@@ -314,14 +314,14 @@ URL: http://ejml.org/
314314
USED BY: Used in deep learning, especially RNN parser and sentiment
315315
Needed by CoreNLP distributions.
316316

317-
LAST UPDATE: 2017-11-30
318-
LAST UPDATE BY: Christopher Manning
317+
LAST UPDATE: 2019-07-29
318+
LAST UPDATE BY: John Bauer
319319

320320
-----------------------------------------------------------------------
321-
ejml-simple-0.32.jar
322-
ORIGINAL JAR NAME: ejml-simple-0.32.jar
323-
VERSION: 0.32
324-
RELEASE DATE: 2017-09-18
321+
ejml-simple-0.38.jar
322+
ORIGINAL JAR NAME: ejml-simple-0.38.jar
323+
VERSION: 0.38
324+
RELEASE DATE: 2019-03-14
325325
SOURCE AVAILABLE: yes
326326
DESCRIPTION: Another matrix library for Java, perhaps fastest for medium
327327
size vectors and matrices in 2012. Otherwise, it's ojAlgo.
@@ -330,8 +330,8 @@ URL: http://ejml.org/
330330
USED BY: Used in deep learning, especially RNN parser and sentiment
331331
Needed by CoreNLP distributions.
332332

333-
LAST UPDATE: 2017-11-30
334-
LAST UPDATE BY: Christopher Manning
333+
LAST UPDATE: 2019-07-29
334+
LAST UPDATE BY: John Bauer
335335

336336
-----------------------------------------------------------------------
337337
javacc.jar

lib/ejml-core-0.32.jar

-151 KB
Binary file not shown.

lib/ejml-core-0.38.jar

181 KB
Binary file not shown.

lib/ejml-ddense-0.32.jar

-295 KB
Binary file not shown.

lib/ejml-ddense-0.38.jar

327 KB
Binary file not shown.

lib/ejml-simple-0.32.jar

-177 KB
Binary file not shown.

lib/ejml-simple-0.38.jar

171 KB
Binary file not shown.

libsrc/ejml-core-0.38-sources.jar

185 KB
Binary file not shown.

libsrc/ejml-ddense-0.38-sources.jar

307 KB
Binary file not shown.

libsrc/ejml-simple-0.38-sources.jar

74.9 KB
Binary file not shown.

libsrc/ejml-v0.32-src.zip

-1.37 MB
Binary file not shown.

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,19 +99,19 @@
9999
<dependency>
100100
<groupId>org.ejml</groupId>
101101
<artifactId>ejml-core</artifactId>
102-
<version>0.32</version>
102+
<version>0.38</version>
103103
</dependency>
104104

105105
<dependency>
106106
<groupId>org.ejml</groupId>
107107
<artifactId>ejml-ddense</artifactId>
108-
<version>0.32</version>
108+
<version>0.38</version>
109109
</dependency>
110110

111111
<dependency>
112112
<groupId>org.ejml</groupId>
113113
<artifactId>ejml-simple</artifactId>
114-
<version>0.32</version>
114+
<version>0.38</version>
115115
</dependency>
116116

117117
<dependency>

src/edu/stanford/nlp/neural/NeuralUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ public static SimpleMatrix elementwiseApplyTanh(SimpleMatrix input) {
259259
*/
260260
public static SimpleMatrix elementwiseApplyTanhDerivative(SimpleMatrix input) {
261261
SimpleMatrix output = new SimpleMatrix(input.numRows(), input.numCols());
262-
output.set(1.0);
262+
output.fill(1.0);
263263
output = output.minus(input.elementMult(input));
264264
return output;
265265
}

src/edu/stanford/nlp/neural/SimpleTensor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public SimpleTensor(SimpleTensor other) {
7171
public static SimpleTensor random(int numRows, int numCols, int numSlices, double minValue, double maxValue, java.util.Random rand) {
7272
SimpleTensor tensor = new SimpleTensor(numRows, numCols, numSlices);
7373
for (int i = 0; i < numSlices; ++i) {
74-
tensor.slices[i] = SimpleMatrix.random64(numRows, numCols, minValue, maxValue, rand);
74+
tensor.slices[i] = SimpleMatrix.random_DDRM(numRows, numCols, minValue, maxValue, rand);
7575
}
7676
return tensor;
7777
}
@@ -106,7 +106,7 @@ public int getNumElements() {
106106

107107
public void set(double value) {
108108
for (int slice = 0; slice < numSlices; ++slice) {
109-
slices[slice].set(value);
109+
slices[slice].fill(value);
110110
}
111111
}
112112

src/edu/stanford/nlp/parser/dvparser/DVModel.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ private SimpleMatrix randomContextMatrix() {
197197
SimpleMatrix matrix = new SimpleMatrix(numRows, numCols * 2);
198198
matrix.insertIntoThis(0, 0, identity.scale(op.trainOptions.scalingForInit * 0.1));
199199
matrix.insertIntoThis(0, numCols, identity.scale(op.trainOptions.scalingForInit * 0.1));
200-
matrix = matrix.plus(SimpleMatrix.random64(numRows,numCols * 2,-1.0/Math.sqrt((double)numCols * 100.0),1.0/Math.sqrt((double)numCols * 100.0),rand));
200+
matrix = matrix.plus(SimpleMatrix.random_DDRM(numRows,numCols * 2,-1.0/Math.sqrt((double)numCols * 100.0),1.0/Math.sqrt((double)numCols * 100.0),rand));
201201
return matrix;
202202
}
203203

@@ -210,13 +210,13 @@ private SimpleMatrix randomTransformMatrix() {
210210
SimpleMatrix matrix;
211211
switch (op.trainOptions.transformMatrixType) {
212212
case DIAGONAL:
213-
matrix = SimpleMatrix.random64(numRows,numCols,-1.0/Math.sqrt((double)numCols * 100.0),1.0/Math.sqrt((double)numCols * 100.0),rand).plus(identity);
213+
matrix = SimpleMatrix.random_DDRM(numRows,numCols,-1.0/Math.sqrt((double)numCols * 100.0),1.0/Math.sqrt((double)numCols * 100.0),rand).plus(identity);
214214
break;
215215
case RANDOM:
216-
matrix = SimpleMatrix.random64(numRows,numCols,-1.0/Math.sqrt((double)numCols),1.0/Math.sqrt((double)numCols),rand);
216+
matrix = SimpleMatrix.random_DDRM(numRows,numCols,-1.0/Math.sqrt((double)numCols),1.0/Math.sqrt((double)numCols),rand);
217217
break;
218218
case OFF_DIAGONAL:
219-
matrix = SimpleMatrix.random64(numRows,numCols,-1.0/Math.sqrt((double)numCols * 100.0),1.0/Math.sqrt((double)numCols * 100.0),rand).plus(identity);
219+
matrix = SimpleMatrix.random_DDRM(numRows,numCols,-1.0/Math.sqrt((double)numCols * 100.0),1.0/Math.sqrt((double)numCols * 100.0),rand).plus(identity);
220220
for (int i = 0; i < numCols; ++i) {
221221
int x = rand.nextInt(numCols);
222222
int y = rand.nextInt(numCols);
@@ -225,7 +225,7 @@ private SimpleMatrix randomTransformMatrix() {
225225
}
226226
break;
227227
case RANDOM_ZEROS:
228-
matrix = SimpleMatrix.random64(numRows,numCols,-1.0/Math.sqrt((double)numCols * 100.0),1.0/Math.sqrt((double)numCols * 100.0),rand).plus(identity);
228+
matrix = SimpleMatrix.random_DDRM(numRows,numCols,-1.0/Math.sqrt((double)numCols * 100.0),1.0/Math.sqrt((double)numCols * 100.0),rand).plus(identity);
229229
for (int i = 0; i < numCols; ++i) {
230230
int x = rand.nextInt(numCols);
231231
int y = rand.nextInt(numCols);
@@ -246,7 +246,7 @@ public void addRandomUnaryMatrix(String childBasic) {
246246
++numUnaryMatrices;
247247

248248
// scoring matrix
249-
SimpleMatrix score = SimpleMatrix.random64(1, numCols, -1.0/Math.sqrt((double)numCols),1.0/Math.sqrt((double)numCols),rand);
249+
SimpleMatrix score = SimpleMatrix.random_DDRM(1, numCols, -1.0/Math.sqrt((double)numCols),1.0/Math.sqrt((double)numCols),rand);
250250
unaryScore.put(childBasic, score.scale(op.trainOptions.scalingForInit));
251251

252252
SimpleMatrix transform;
@@ -270,7 +270,7 @@ public void addRandomBinaryMatrix(String leftBasic, String rightBasic) {
270270
++numBinaryMatrices;
271271

272272
// scoring matrix
273-
SimpleMatrix score = SimpleMatrix.random64(1, numCols, -1.0/Math.sqrt((double)numCols),1.0/Math.sqrt((double)numCols),rand);
273+
SimpleMatrix score = SimpleMatrix.random_DDRM(1, numCols, -1.0/Math.sqrt((double)numCols),1.0/Math.sqrt((double)numCols),rand);
274274
binaryScore.put(leftBasic, rightBasic, score.scale(op.trainOptions.scalingForInit));
275275

276276
SimpleMatrix binary;
@@ -583,8 +583,8 @@ public void readWordVectors() {
583583
}
584584

585585
if (op.trainOptions.useContextWords) {
586-
SimpleMatrix start = SimpleMatrix.random64(op.lexOptions.numHid, 1, -0.5, 0.5, rand);
587-
SimpleMatrix end = SimpleMatrix.random64(op.lexOptions.numHid, 1, -0.5, 0.5, rand);
586+
SimpleMatrix start = SimpleMatrix.random_DDRM(op.lexOptions.numHid, 1, -0.5, 0.5, rand);
587+
SimpleMatrix end = SimpleMatrix.random_DDRM(op.lexOptions.numHid, 1, -0.5, 0.5, rand);
588588
wordVectors.put(START_WORD, start);
589589
wordVectors.put(END_WORD, end);
590590
}

src/edu/stanford/nlp/sentiment/ConvertMatlabModel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public static void main(String[] args) throws IOException {
154154
}
155155

156156
if (!wordVectors.containsKey(SentimentModel.UNKNOWN_WORD)) {
157-
wordVectors.put(SentimentModel.UNKNOWN_WORD, SimpleMatrix.random64(numSlices, 1, -0.00001, 0.00001, new Random()));
157+
wordVectors.put(SentimentModel.UNKNOWN_WORD, SimpleMatrix.random_DDRM(numSlices, 1, -0.00001, 0.00001, new Random()));
158158
}
159159

160160
SentimentModel model = SentimentModel.modelFromMatrices(W, Wcat, tensor, wordVectors, op);

src/edu/stanford/nlp/sentiment/SentimentModel.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ SimpleMatrix randomTransformMatrix() {
452452

453453
SimpleMatrix randomTransformBlock() {
454454
double range = 1.0 / (Math.sqrt((double) numHid) * 2.0);
455-
return SimpleMatrix.random64(numHid,numHid,-range,range,rand).plus(identity);
455+
return SimpleMatrix.random_DDRM(numHid,numHid,-range,range,rand).plus(identity);
456456
}
457457

458458
/**
@@ -461,9 +461,9 @@ SimpleMatrix randomTransformBlock() {
461461
SimpleMatrix randomClassificationMatrix() {
462462
SimpleMatrix score = new SimpleMatrix(numClasses, numHid + 1);
463463
double range = 1.0 / (Math.sqrt((double) numHid));
464-
score.insertIntoThis(0, 0, SimpleMatrix.random64(numClasses, numHid, -range, range, rand));
464+
score.insertIntoThis(0, 0, SimpleMatrix.random_DDRM(numClasses, numHid, -range, range, rand));
465465
// bias column goes from 0 to 1 initially
466-
score.insertIntoThis(0, numHid, SimpleMatrix.random64(numClasses, 1, 0.0, 1.0, rand));
466+
score.insertIntoThis(0, numHid, SimpleMatrix.random_DDRM(numClasses, 1, 0.0, 1.0, rand));
467467
return score.scale(op.trainOptions.scalingForInit);
468468
}
469469

0 commit comments

Comments
 (0)