Question: I've tried to save a model with `keras.ModelCheckpoint` but even though it prints out `Epoch 00001: saving model to cp.ckpt` etc. it doesn't create any files. Any ideas?

```
cp_callback = tf.keras.callbacks.ModelCheckpoint(filepath='cp.ckpt', save_weights_only=True, verbose=1)
model_history = model.fit(train_data, epochs=10, steps_per_epoch=200, validation_data=val_data, validation_steps=50, callbacks=[cp_callback])

```

Answer: 
Make sure the directory you're looking for the file in matches where the script is running from. This can be deceptive if you're calling it from a module or in other indirect ways.

You could try the following:

1. `print(os.getcwd())` to check the actual directory of where the file is being saved
2. Use a fully qualified patch in the `filepath` input to make sure it's a directory you're expecting.
I provided the following path:

```
filepath = r'C:\Users\User\PycharmProjects\models\dnn_checkpoint\dnn_checkpoint'

```

And the checkpoint files were at:

```
C:\Users\User\PycharmProjects\models\dnn_checkpoint

```

Seems like it uses the basename of filepath as the basename for some of the checkpoint file names.