Skip to content

Instantly share code, notes, and snippets.

@georgeperry1
Created July 12, 2019 15:48
Show Gist options
  • Save georgeperry1/630e2ff52a9c0fafe13fa9b86ee2a011 to your computer and use it in GitHub Desktop.
Save georgeperry1/630e2ff52a9c0fafe13fa9b86ee2a011 to your computer and use it in GitHub Desktop.
function run() {
Promise.all([
encodeData(comments),
encodeData(comment_testing)
])
.then(data => {
const {
0: training_data,
1: testing_data,
} = data;
model.fit(training_data, outputData, { epochs: 200 })
.then(history => {
model.predict(testing_data).print();
});
})
.catch(err => console.log('Prom Err:', err));
};
// Call function
run();
@ycmjason
Copy link

Nice article. Can I suggest const [training_data, testing_data] = data?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment