I have a pretrained model that was trained on batches of 1024. Now when I try to make a simple prediction on a new sample I get this Warning:
WARNING:tensorflow:Model was constructed with shape (1024, 87, 16) for input KerasTensor(type_spec=TensorSpec(shape=(1024, 87, 16), dtype=tf.float32, name='Input'), name='Input', description="created by layer 'Input'"), but it was called on an input with incompatible shape (1, 87, 16). <
How can I remove the batch dimension? Will it make a difference in the prediction result if I ignore the warning?
#load model
json_file = open(data_dir+'wt_sm_model.json', 'r')
loaded_model_json = json_file.read()
json_file.close()
loaded_model = model_from_json(loaded_model_json)
# load weights
loaded_model.load_weights(data_dir+"wt_sm_model.h5")
print("Loaded model from disk")
#Define Model
losses=[mse,mse,mse,mse,mse,mse,mse,mse,scc,scc,scc,scc,scc,scc,scc,scc,scc,scc,scc,scc,scc,scc,scc,
scc,scc,scc,scc,scc,scc,scc,scc,scc,scc]
optimizer = keras.optimizers.Adam(lr=0.003)
reduce_lr = callbacks.ReduceLROnPlateau(monitor='val_loss', factor=0.5,patience=3, min_lr=0.0005)
early_stopping = callbacks.EarlyStopping(monitor='val_loss', patience=10)
#Compile and Predict
loaded_model.compile(loss = losses, optimizer=optimizer, metrics='accuracy')
prediction=model.predict(mfcc,callbacks=[reduce_lr,early_stopping],steps = 1,verbose=1)
wt_sm_model.json:
{"class_name": "Functional", "config": {"name": "model", "layers": [{"class_name": "InputLayer", "config": {"batch_input_shape": [1024, 87, 16], "dtype": "float32", "sparse": false, "ragged": false, "name": "Input"}, "name": "Input", "inbound_nodes": []}, {"class_name": "Bidirectional", "config": {"name": "BidirLSTM", "trainable": true, "dtype": "float32", "layer": {"class_name": "LSTM", "config": {"name": "lstm", "trainable": true, "batch_input_shape": [null, 87, 16], "dtype": "float32", "return_sequences": false, "return_state": false, "go_backwards": false, "stateful": false, "unroll": false, "time_major": false, "units": 64, "activation": "tanh", "recurrent_activation": "sigmoid", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "recurrent_initializer": {"class_name": "Orthogonal", "config": {"gain": 1.0, "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "unit_forget_bias": true, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 0.009999999776482582}}, "recurrent_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "recurrent_constraint": null, "bias_constraint": null, "dropout": 0.01, "recurrent_dropout": 0.01, "implementation": 1}}, "merge_mode": "concat"}, "name": "BidirLSTM", "inbound_nodes": [[["Input", 0, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "Dense", "trainable": true, "dtype": "float32", "units": 256, "activation": "relu", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 0.009999999776482582}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "Dense", "inbound_nodes": [[["BidirLSTM", 0, 0, {}]]]}, {"class_name": "BatchNormalization", "config": {"name": "BatchNorm", "trainable": true, "dtype": "float32", "axis": [1], "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "name": "BatchNorm", "inbound_nodes": [[["Dense", 0, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "MidCon", "trainable": true, "dtype": "float32", "units": 128, "activation": "relu", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 0.009999999776482582}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "MidCon", "inbound_nodes": [[["BatchNorm", 0, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "MidCat", "trainable": true, "dtype": "float32", "units": 128, "activation": "relu", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 0.009999999776482582}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "MidCat", "inbound_nodes": [[["BatchNorm", 0, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "ConFltPre", "trainable": true, "dtype": "float32", "units": 32, "activation": "relu", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 0.009999999776482582}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "ConFltPre", "inbound_nodes": [[["MidCon", 0, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "ConModPre", "trainable": true, "dtype": "float32", "units": 32, "activation": "relu", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 0.009999999776482582}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "ConModPre", "inbound_nodes": [[["MidCon", 0, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "ConOscPre", "trainable": true, "dtype": "float32", "units": 32, "activation": "relu", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 0.009999999776482582}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "ConOscPre", "inbound_nodes": [[["MidCon", 0, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "MidMtx", "trainable": true, "dtype": "float32", "units": 128, "activation": "relu", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 0.009999999776482582}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "MidMtx", "inbound_nodes": [[["BatchNorm", 0, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "CatWTPre", "trainable": true, "dtype": "float32", "units": 32, "activation": "relu", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 0.009999999776482582}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "CatWTPre", "inbound_nodes": [[["MidCat", 0, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "CatFltPre", "trainable": true, "dtype": "float32", "units": 32, "activation": "relu", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 0.009999999776482582}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "CatFltPre", "inbound_nodes": [[["MidCat", 0, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "CatModPre", "trainable": true, "dtype": "float32", "units": 32, "activation": "relu", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 0.009999999776482582}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "CatModPre", "inbound_nodes": [[["MidCat", 0, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "CatOscPre", "trainable": true, "dtype": "float32", "units": 32, "activation": "relu", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 0.009999999776482582}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "CatOscPre", "inbound_nodes": [[["MidCat", 0, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "ConFlt", "trainable": true, "dtype": "float32", "units": 8, "activation": "sigmoid", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 0.009999999776482582}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "ConFlt", "inbound_nodes": [[["ConFltPre", 0, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "ConMod", "trainable": true, "dtype": "float32", "units": 38, "activation": "sigmoid", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 0.009999999776482582}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "ConMod", "inbound_nodes": [[["ConModPre", 0, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "ConOsc", "trainable": true, "dtype": "float32", "units": 12, "activation": "sigmoid", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 0.009999999776482582}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "ConOsc", "inbound_nodes": [[["ConOscPre", 0, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "ModVectorAmp", "trainable": true, "dtype": "float32", "units": 52, "activation": "tanh", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L1", "config": {"l1": 0.05000000074505806}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "ModVectorAmp", "inbound_nodes": [[["MidMtx", 0, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "ModVectorEnv2", "trainable": true, "dtype": "float32", "units": 52, "activation": "tanh", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L1", "config": {"l1": 0.05000000074505806}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "ModVectorEnv2", "inbound_nodes": [[["MidMtx", 0, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "ModVectorEnv3", "trainable": true, "dtype": "float32", "units": 52, "activation": "tanh", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L1", "config": {"l1": 0.05000000074505806}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "ModVectorEnv3", "inbound_nodes": [[["MidMtx", 0, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "ModVectorLFO1", "trainable": true, "dtype": "float32", "units": 52, "activation": "tanh", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L1", "config": {"l1": 0.05000000074505806}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "ModVectorLFO1", "inbound_nodes": [[["MidMtx", 0, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "ModVectorLFO2", "trainable": true, "dtype": "float32", "units": 52, "activation": "tanh", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L1", "config": {"l1": 0.05000000074505806}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "ModVectorLFO2", "inbound_nodes": [[["MidMtx", 0, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "OSC1WT", "trainable": true, "dtype": "float32", "units": 194, "activation": "softmax", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 0.009999999776482582}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "OSC1WT", "inbound_nodes": [[["CatWTPre", 0, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "OSC2WT", "trainable": true, "dtype": "float32", "units": 194, "activation": "softmax", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 0.009999999776482582}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "OSC2WT", "inbound_nodes": [[["CatWTPre", 0, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "Flt1BpNMo", "trainable": true, "dtype": "float32", "units": 2, "activation": "softmax", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 0.009999999776482582}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "Flt1BpNMo", "inbound_nodes": [[["CatFltPre", 0, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "Flt1LpHp", "trainable": true, "dtype": "float32", "units": 5, "activation": "softmax", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 0.009999999776482582}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "Flt1LpHp", "inbound_nodes": [[["CatFltPre", 0, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "Flt1ON", "trainable": true, "dtype": "float32", "units": 2, "activation": "softmax", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 0.009999999776482582}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "Flt1ON", "inbound_nodes": [[["CatFltPre", 0, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "Flt1Slope", "trainable": true, "dtype": "float32", "units": 2, "activation": "softmax", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 0.009999999776482582}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "Flt1Slope", "inbound_nodes": [[["CatFltPre", 0, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "Flt1Type", "trainable": true, "dtype": "float32", "units": 5, "activation": "softmax", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 0.009999999776482582}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "Flt1Type", "inbound_nodes": [[["CatFltPre", 0, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "Flt2BpNMo", "trainable": true, "dtype": "float32", "units": 2, "activation": "softmax", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 0.009999999776482582}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "Flt2BpNMo", "inbound_nodes": [[["CatFltPre", 0, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "Flt2LpHp", "trainable": true, "dtype": "float32", "units": 5, "activation": "softmax", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 0.009999999776482582}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "Flt2LpHp", "inbound_nodes": [[["CatFltPre", 0, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "Flt2ON", "trainable": true, "dtype": "float32", "units": 2, "activation": "softmax", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 0.009999999776482582}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "Flt2ON", "inbound_nodes": [[["CatFltPre", 0, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "Flt2Slope", "trainable": true, "dtype": "float32", "units": 2, "activation": "softmax", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 0.009999999776482582}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "Flt2Slope", "inbound_nodes": [[["CatFltPre", 0, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "Flt2Type", "trainable": true, "dtype": "float32", "units": 5, "activation": "softmax", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 0.009999999776482582}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "Flt2Type", "inbound_nodes": [[["CatFltPre", 0, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "GlobalFltRouting", "trainable": true, "dtype": "float32", "units": 3, "activation": "softmax", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 0.009999999776482582}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "GlobalFltRouting", "inbound_nodes": [[["CatFltPre", 0, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "AmpLoop", "trainable": true, "dtype": "float32", "units": 3, "activation": "softmax", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 0.009999999776482582}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "AmpLoop", "inbound_nodes": [[["CatModPre", 0, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "Env2Loop", "trainable": true, "dtype": "float32", "units": 3, "activation": "softmax", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 0.009999999776482582}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "Env2Loop", "inbound_nodes": [[["CatModPre", 0, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "Env3Loop", "trainable": true, "dtype": "float32", "units": 3, "activation": "softmax", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 0.009999999776482582}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "Env3Loop", "inbound_nodes": [[["CatModPre", 0, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "LFO1Shape", "trainable": true, "dtype": "float32", "units": 5, "activation": "softmax", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 0.009999999776482582}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "LFO1Shape", "inbound_nodes": [[["CatModPre", 0, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "LFO2Shape", "trainable": true, "dtype": "float32", "units": 5, "activation": "softmax", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 0.009999999776482582}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "LFO2Shape", "inbound_nodes": [[["CatModPre", 0, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "OSC1FxMode", "trainable": true, "dtype": "float32", "units": 5, "activation": "softmax", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 0.009999999776482582}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "OSC1FxMode", "inbound_nodes": [[["CatOscPre", 0, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "OSC1Transpose", "trainable": true, "dtype": "float32", "units": 49, "activation": "softmax", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 0.009999999776482582}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "OSC1Transpose", "inbound_nodes": [[["CatOscPre", 0, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "OSC2FxMode", "trainable": true, "dtype": "float32", "units": 5, "activation": "softmax", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 0.009999999776482582}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "OSC2FxMode", "inbound_nodes": [[["CatOscPre", 0, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "OSC2Transpose", "trainable": true, "dtype": "float32", "units": 49, "activation": "softmax", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 0.009999999776482582}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "OSC2Transpose", "inbound_nodes": [[["CatOscPre", 0, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "SubTranspose", "trainable": true, "dtype": "float32", "units": 3, "activation": "softmax", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 0.009999999776482582}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "SubTranspose", "inbound_nodes": [[["CatOscPre", 0, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "UniMode", "trainable": true, "dtype": "float32", "units": 7, "activation": "softmax", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 0.009999999776482582}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "UniMode", "inbound_nodes": [[["CatOscPre", 0, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "UniVoiceCount", "trainable": true, "dtype": "float32", "units": 7, "activation": "softmax", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 0.009999999776482582}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "UniVoiceCount", "inbound_nodes": [[["CatOscPre", 0, 0, {}]]]}], "input_layers": [["Input", 0, 0]], "output_layers": [["ConFlt", 0, 0], ["ConMod", 0, 0], ["ConOsc", 0, 0], ["ModVectorAmp", 0, 0], ["ModVectorEnv2", 0, 0], ["ModVectorEnv3", 0, 0], ["ModVectorLFO1", 0, 0], ["ModVectorLFO2", 0, 0], ["OSC1WT", 0, 0], ["OSC2WT", 0, 0], ["Flt1BpNMo", 0, 0], ["Flt1LpHp", 0, 0], ["Flt1ON", 0, 0], ["Flt1Slope", 0, 0], ["Flt1Type", 0, 0], ["Flt2BpNMo", 0, 0], ["Flt2LpHp", 0, 0], ["Flt2ON", 0, 0], ["Flt2Slope", 0, 0], ["Flt2Type", 0, 0], ["GlobalFltRouting", 0, 0], ["AmpLoop", 0, 0], ["Env2Loop", 0, 0], ["Env3Loop", 0, 0], ["LFO1Shape", 0, 0], ["LFO2Shape", 0, 0], ["OSC1FxMode", 0, 0], ["OSC1Transpose", 0, 0], ["OSC2FxMode", 0, 0], ["OSC2Transpose", 0, 0], ["SubTranspose", 0, 0], ["UniMode", 0, 0], ["UniVoiceCount", 0, 0]]}, "keras_version": "2.4.0", "backend": "tensorflow"}
(1024, 87, 16)
, you can safely change it to(None, 86, 16)
to use a variable-sized batch dimension. – jakubwt_sm_model.json
? The should is likely defined in there. – jakub