Open loic-brtd opened 4 years ago
@lobertrand - thank you for flagging this. @yining1023 and I will be doing a refactor of the NN feature this summer and will definitely try to address this.
For now, if you're keen to use async/await
, I'm wondering if you could do the following:
const nn = ml5.neuralNetwork({
inputs: INPUTS,
outputs: OUTPUTS,
task: 'classification'
});
nn.options.dataUrl = 'datata.csv';
await nn.loadDataInternal(nn.options);
It's not ideal, but might do the trick.
Dear ml5 community, I'm submitting a new issue. Please see the details below.
Is there a way that I can create a Neural Network without a callback, using the
await
keyword? I tried the following and it seems to work fine with version 0.4.3 of ml5:Using
await nn.ready
feels like a hack ^^ And with version 0.5.0, it throws an error:I'm using: