Skip to content

Commit 64dbe82

Browse files
authored
Adjust charrnn test option length (#326)
* changed 500 to 100 to shorted test time * fixed .tobe() to match option * changed vocab size to 64 * changed timeout to 12000
1 parent d5613e1 commit 64dbe82

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/CharRNN/index_test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const RNN_MODEL_URL = 'https://raw.githubusercontent.com/ml5js/ml5-data-and-mode
99

1010
const RNN_MODEL_DEFAULTS = {
1111
cellsAmount: 2,
12-
vocabSize: 223
12+
vocabSize: 64
1313
};
1414

1515
const RNN_DEFAULTS = {
@@ -21,15 +21,15 @@ const RNN_DEFAULTS = {
2121

2222
const RNN_OPTIONS = {
2323
seed: 'the meaning of pizza is: ',
24-
length: 500,
24+
length: 100,
2525
temperature: 0.7
2626
}
2727

2828
describe('charRnn', () => {
2929
let rnn;
3030

3131
beforeAll(async () => {
32-
jasmine.DEFAULT_TIMEOUT_INTERVAL = 60000; //set extra long interval due to issues with CharRNN generation time
32+
jasmine.DEFAULT_TIMEOUT_INTERVAL = 120000; //set extra long interval due to issues with CharRNN generation time
3333
rnn = await charRNN(RNN_MODEL_URL, undefined);
3434
});
3535

@@ -54,7 +54,7 @@ describe('charRnn', () => {
5454

5555
it('generates content that follows the set options', async() => {
5656
const result = await rnn.generate(RNN_OPTIONS);
57-
expect(result.sample.length).toBe(500);
57+
expect(result.sample.length).toBe(100);
5858
});
5959
});
6060
});

0 commit comments

Comments
 (0)