Skip to content Skip to sidebar Skip to footer

Unknown Regularizer: L2 In Tensorflowjs

I have trained a model in python using model reg = 0.000001 model = Sequential() model.add(Dense(24, activation='tanh', name='input_dense', input_shape=input_shape)) model.add(GRU(

Solution 1:

Option 1

There are no classes L1 and L2; they are just interfaces(more here)

There is a class L1L2 which will take the config and return the right regularizer. You can manually replace all occurences of L2 to L1L2.

Option 2

Register a class L2

classL2 {

    static className = 'L2';

    constructor(config) {
       return tf.regularizers.l1l2(config)
    }
}
tf.serialization.registerClass(L2);

// now load the model

Post a Comment for "Unknown Regularizer: L2 In Tensorflowjs"