How to use the @tensorflow/tfjs-layers/dist/engine/training.ModelLoggingVerbosity.VERBOSE function in @tensorflow/tfjs-layers

To help you get started, we’ve selected a few @tensorflow/tfjs-layers examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github BeTomorrow / ReImproveJS / src / agent.ts View on Github external
this.memory.sample(this.config.batchSize).forEach((memento => {
            let target = memento.reward;
            if (!this.done) {
                target = memento.reward + this.config.learningConfig.gamma * this.model.predict(memento.nextState).getHighestValue();
            }

            let future_target = this.model.predict(memento.state).getValue();
            future_target[memento.action] = target;
            this.model.fit(memento.state, tensor2d(future_target, [1, 3]), {epochs:1, verbose: ModelLoggingVerbosity.VERBOSE}).then((result) => this.lossesHistory.add(result.loss));
        }));
    }