Definition at line 223 of file my_callbacks.py.
def my_callbacks.IterationsCallback.__init__ |
( |
|
self, |
|
|
|
validation_generator, |
|
|
|
validation_steps |
|
) |
| |
Definition at line 225 of file my_callbacks.py.
225 def __init__(self, validation_generator, validation_steps):
228 self.
fil =
'/scratch/cvn/branch/log/resnet34'
def __init__(self, validation_generator, validation_steps)
def my_callbacks.IterationsCallback.on_batch_end |
( |
|
self, |
|
|
|
batch, |
|
|
|
logs = {} |
|
) |
| |
Definition at line 241 of file my_callbacks.py.
244 self.losses.append([self.
iteration, logs.get(
'acc'), logs.get(
'loss'), val_acc, val_loss])
def on_batch_end(self, batch, logs={})
def my_callbacks.IterationsCallback.on_epoch_end |
( |
|
self, |
|
|
|
epoch, |
|
|
|
logs = {} |
|
) |
| |
Definition at line 247 of file my_callbacks.py.
248 with
open(self.
fil,
'a')
as fil:
249 for iteration, acc, loss, val_acc, val_loss
in self.
losses:
250 fil.write(
str(iteration) +
' ' +
str(acc) +
' ' +
str(loss) +
' ' +
str(val_acc) +
' ' +
str(val_loss) +
'\n')
int open(const char *, int)
Opens a file descriptor.
def on_epoch_end(self, epoch, logs={})
def my_callbacks.IterationsCallback.on_train_begin |
( |
|
self, |
|
|
|
logs = {} |
|
) |
| |
Definition at line 230 of file my_callbacks.py.
234 with
open(self.
fil,
'ar+')
as fil:
235 if os.stat(self.
fil).st_size == 0:
236 self.losses.append([
'iter',
'acc',
'loss',
'val_acc',
'val_loss'])
int open(const char *, int)
Opens a file descriptor.
def on_train_begin(self, logs={})
void split(std::string const &s, char c, OutIter dest)
my_callbacks.IterationsCallback.fil |
my_callbacks.IterationsCallback.iteration |
my_callbacks.IterationsCallback.losses |
my_callbacks.IterationsCallback.validation_generator |
my_callbacks.IterationsCallback.validation_steps |
The documentation for this class was generated from the following file: