Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix charRNN tests #349

Merged
merged 14 commits into from
Apr 19, 2019
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.env
dev
examples/es6/node_modules
experiments/node_modules
Expand All @@ -19,4 +20,4 @@ website/node_modules
website/i18n/*
!website/i18n/en.json

yarn-error.log
yarn-error.log
14 changes: 7 additions & 7 deletions src/CharRNN/index_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const RNN_MODEL_URL = 'https://raw.githubusercontent.com/ml5js/ml5-data-and-mode

const RNN_MODEL_DEFAULTS = {
cellsAmount: 2,
vocabSize: 64
vocabSize: 223
};

const RNN_DEFAULTS = {
Expand All @@ -21,15 +21,15 @@ const RNN_DEFAULTS = {

const RNN_OPTIONS = {
seed: 'the meaning of pizza is: ',
length: 100,
length: 30,
temperature: 0.7
}

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

beforeAll(async () => {
jasmine.DEFAULT_TIMEOUT_INTERVAL = 120000; //set extra long interval due to issues with CharRNN generation time
jasmine.DEFAULT_TIMEOUT_INTERVAL = 20000; //set extra long interval due to issues with CharRNN generation time
rnn = await charRNN(RNN_MODEL_URL, undefined);
});

Expand All @@ -52,9 +52,9 @@ describe('charRnn', () => {
expect(result.sample.length).toBe(20);
});

// it('generates content that follows the set options', async() => {
// const result = await rnn.generate(RNN_OPTIONS);
// expect(result.sample.length).toBe(100);
// });
it('generates content that follows the set options', async() => {
const result = await rnn.generate(RNN_OPTIONS);
expect(result.sample.length).toBe(30);
});
});
});