class idPredict extends tf.layers.Layer {
    static className = 'IdPredict2';

    constructor(config = {
        predictSteps: 30,
        groups: 10,
        noSkip: false,
        first: true,
        groupsSize: 20
    }) {
        super(config);

        this.predictSteps = config.predictSteps
        this.groups = config.groups
        this.first = config.first
        this.groupsSize = config.groupsSize
        this.n = 0
        this.noSkip = config.noSkip
    }

    build(inputShape) {
        this.groupsD = this.addWeight("groupsd", [this.groups * this.predictSteps, inputShape[1], 1], "float32", tf.initializers.randomNormal({
                maxval: 1.0,
                minval: 0.0
            }), undefined, true);
        this.groupsL = this.addWeight("groupsl", [this.groups * this.predictSteps, 1, inputShape[2]], "float32", tf.initializers.randomNormal({
                maxval: 1.0,
                minval: 0.0
            }), undefined, true);
        this.groupsFF = this.addWeight("groupsff", [inputShape[1], inputShape[2]], "float32", tf.initializers.randomNormal({
                maxval: 1.0,
                minval: 0.0
            }), undefined, true);
this.trainable=true
        this.built = true
    }
    call(input) {
        let vd = this.groupsD.read()
        let vl = this.groupsL.read()
        let r = vd.matMul(vl).tanh()
       

        let r2 
   
            r2 = input[0].slice([0, this.predictSteps, 0], [input[0].shape[0], input[0].shape[1] - this.predictSteps, input[0].shape[2]]).c