Math + Python = Love

junissen9

Junissen

Posted on November 22, 2024

Math + Python = Love

I recommende you, when creating a solution, think necessarily in context mathematical statement. Becouse of:

  1. It's easily save project boundaries, while you coding thought
  2. There're more opportunity for maneuver in space of programme

Image description

Cross-entropy for AI help train a neural network in best practice each era. Often used different Math construction, like stochastic descent method.

Image description

Weight coefficient map focus our characterictics neural network in a right way. For avoiding gross errors in the resulting values.

best_w = keras.callbacks.ModelCheckpoint('unet_best.h5', 
                                monitor='val_loss',
                                verbose=0,
                                save_best_only=True,
                                save_weights_only=True,
                                mode='auto',
                                period=1)

last_w = keras.callbacks.ModelCheckpoint('unet_last.h5',
                                monitor='val_loss',
                                verbose=0,
                                save_best_only=False,
                                save_weights_only=True,
                                mode='auto',
                                period=1)

callbacks = [best_w, last_w]

Enter fullscreen mode Exit fullscreen mode

It's better to create already 2 lists: best and last weights of model. This will be useful when calculating the error value.

Finish result looks, like:

Image description

💖 💪 🙅 🚩
junissen9
Junissen

Posted on November 22, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Math + Python = Love
python Math + Python = Love

November 22, 2024