BeTomorrow / ReImproveJS

A framework using TensorFlow.js for Deep Reinforcement Learning
MIT License
122 stars 16 forks source link

expected dense_Dense1_input to have shape [null,12] but got array with shape [1,14] #23

Closed DerScherenmann closed 4 years ago

DerScherenmann commented 4 years ago

I am getting this error when running ReimproveJs

Uncaught (in promise) Error: Error when checking : expected dense_Dense1_input to have shape [null,12] but got array with shape [1,14].
    at new ValueError (reimprove.js:1)
    at checkInputData (reimprove.js:1)
    at Model.predict (reimprove.js:1)
    at Sequential.predict (reimprove.js:1)
    at Model.predict (reimprove.js:1)
    at reimprove.js:1
    at Object.Tracking.tidy (reimprove.js:1)
    at Agent.createTrainingDataFromMemento (reimprove.js:1)
    at reimprove.js:1
    at Array.map (<anonymous>)

This error is not happening directly but after 5 seconds of it working. its called by academy.step My part, only added inputs:

let inputs = [speed,turn,sensor1Dist,sensor2Dist,sensor3Dist];          // Need to give a number[] of your inputs for one teacher.
        let result = await academy.step([               // Let the magic operate ...
        {teacherName: teacher, agentsInput: inputs}
        ]);
DerScherenmann commented 4 years ago

Defined wrong inputSize