UNPKG

@ignitionai/backend-tfjs

Version:

TensorFlow.js backend for IgnitionAI - browser-based reinforcement learning framework

13 lines (12 loc) 576 B
import * as tf from '@tensorflow/tfjs'; /** * Build a simple Q-network with a Sequential model. * * @param inputSize The size of the input (state dimension) * @param outputSize The number of actions (output dimension) * @param hiddenLayers Optional array defining the number of units in hidden layers. * Default is [24, 24]. * @param lr Learning rate. Default is 0.001. * @returns A compiled tf.Sequential model. */ export declare function buildQNetwork(inputSize: number, outputSize: number, hiddenLayers?: number[], lr?: number): tf.Sequential;