Keras
Package containing the Telegram Keras functions and classes.
KerasTelegramCallback
This class allows to send through a Telegram Bot updates about your training.
__init__(self, bot, epoch_bar=True, to_plot=[])
special
Constructor
Parameters:
Name | Type | Description | Default |
---|---|---|---|
bot |
TelegramBot |
TelegramBot object |
required |
epoch_bar |
bool |
True to receive the current epoch progress bar |
True |
to_plot |
list |
list of dict contaings plot details (e.g. metric to plots and style)
|
[] |
Source code in bob_telegram_tools\keras.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
|
on_batch_begin(self, batch, logs={})
A backwards compatibility alias for on_train_batch_begin
.
Source code in bob_telegram_tools\keras.py
76 77 78 79 80 |
|
on_batch_end(self, batch, logs={})
A backwards compatibility alias for on_train_batch_end
.
Source code in bob_telegram_tools\keras.py
82 83 84 85 86 87 88 89 90 |
|
on_epoch_end(self, batch, logs={})
Called at the end of an epoch.
Subclasses should override for any actions to run. This function should only be called during TRAIN mode.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
epoch |
|
integer, index of epoch. |
required |
logs |
|
dict, metric results for this training epoch, and for the
validation epoch if validation is performed. Validation result keys
are prefixed with |
{} |
Source code in bob_telegram_tools\keras.py
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
|
on_train_begin(self, logs={})
Called at the beginning of training.
Subclasses should override for any actions to run.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
logs |
|
dict. Currently no data is passed to this argument for this method but that may change in the future. |
{} |
Source code in bob_telegram_tools\keras.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
|
on_train_end(self, logs={})
Called at the end of training.
Subclasses should override for any actions to run.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
logs |
|
dict. Currently no data is passed to this argument for this method but that may change in the future. |
{} |
Source code in bob_telegram_tools\keras.py
108 109 110 111 112 113 |
|