Open Jonovono opened 1 year ago
Greetings @Jonovono, You could define callbacks before starting the model training. Below, I provide an example of a callback. Please set it before training the model.
for more information: callbacks
import tensorflow as tf
from keras.callbacks import ModelCheckpoint
callback_checkpoint = ModelCheckpoint(
model_filename,
verbose=1,
monitor='loss',
save_weights_only=True,
save_best_only=True,
mode='min'
)
callbacks = [
callback_checkpoint,
tf.keras.callbacks.ReduceLROnPlateau(),
]
Thanks @mberkay0 , I think that helped but then get onto this error:
RuntimeError: You must compile your model before training/testing. Use model.compile(optimizer, loss)
.
I'm willing to pay you for an hour of your time or so to walk me through this if you are up for it?
I added this:
model.compile(optimizer='adam',
loss='sparse_categorical_crossentropy',
metrics=['accuracy'])
Seems to have gotten past that error, but now get this:
Node: 'deeplabv3plus/tf.compat.v1.nn.depthwise_conv2d_80/depthwise/SpaceToBatchND'
padded_shape[0]=32 is not divisible by block_shape[0]=6
[[{{node deeplabv3plus/tf.compat.v1.nn.depthwise_conv2d_80/depthwise/SpaceToBatchND}}]] [Op:__inference_train_function_37058]
@mberkay0 Can I contact you privately?
Pretty noob to ML, trying to get this project to run and getting this error. Can you help me out?
NameError Traceback (most recent call last)