Skip to content

trainAsync is not a function #895

Open
@fangiridev

Description

@fangiridev

I get this error when trying to use 'net.trainAsync'

  <rejected> TypeError: net.trainAsync is not a function
      at train (/home/container/index.js:21:13)

Code:

  const pool = workerpool.pool();

  await net.trainAsync(data, {
    iterations: 2000,
    errorThresh: 0.01,
    log: true,
    logPeriod: 100,
    useWorkers: true,
    learningRate: 0.01,
    callbackPeriod: 10,
    callback: function(stats) {

      if (stats.accuracy > 0.9) {
        pool.terminate();
        console.log('Training finished');
        client.user.setPresence({ 
          status: 'online', 
          activities: [{ name: 'Estou pronta para uso!', type: 'WATCHING' }]
        });
      }
    }
  });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions