DLmodel: DLmodel Class

Description Usage Format Value Methods Examples

Description

DLmodel Class

Usage

1

Format

R6Class object.

Value

Object of class R6Class and DLmodel.

Methods

Documentation

For full documentation of each method follow the corresponding link.

initialize(...)

Create new object. Documented in DLmodel.initialize.

update(...)

Update fields of the object. Documented in DLmodel.update.

summary()

Model summary. Documented in DLmodel.summary.

log(level = c("DEBUG", "INFO", "WARNING", "ERROR"), message = '...')

Add a message to the object log. Documented in DLmodel.log.

add_to_history(epoch = 0, subepoch = 0, time = Sys.time(), loss = NA, val_loss = NA)

Adds a new entry to the loss history of the model. Documented in DLmodel.add_to_history.

plot_history()

Plots this object's loss history. Documented in DLmodel.plot_history.

reset_history()

Deletes all loss history of this object. Documented in DLmodel.reset_history.

render_history(initialize = TRUE)

Uses RStudio Viewer pane to plot loss history. Documented in DLmodel.render_history.

update_render()

Updates the render of loss history in Viewer pane. Documented in DLmodel.update_render.

get_model()

Returns the keras model. Documented in DLmodel.get_model.

get_width()

Window width used to train the model. Documented in DLmodel.get_width.

set_width(width)

Sets window width for the model. Documented in DLmodel.set_width.

get_loss()

Returns the best loss achieved by the model, or Inf if it hasn't been trained yet. Documented in DLmodel.get_loss.

set_loss(loss)

Sets the loss of the model. Documented in DLmodel.set_loss.

get_encoder()

If the model is an autoencoder, returns the encoder part. Documented in DLmodel.get_encoder.

get_decoder()

If the model is an autoencoder, returns the decoder part. Documented in DLmodel.get_decoder.

get_config()

Returns the configuration of the model. From it, one can re-build the whole model. Documented in DLmodel.get_config.

get_history()

Returns the loss history as a data.frame. Documented in DLmodel.get_history.

print_log(level = c("DEBUG", "WARNING", "INFO", "ERROR"))

Prints this object's log. Documented in DLmodel.print_log.

errors()

Prints errors produced when using this object. Documented in DLmodel.errors.

warnings()

Prints warnings produced when using this object. Documented in DLmodel.warnings.

save_log(filename, level = c("DEBUG", "WARNING", "INFO", "ERROR"))

Saves log to a file. Documented in DLmodel.save_log.

check_memory()

Checks whether the model can be trained given current memory limits. Documented in DLmodel.check_memory.

graph()

Returns the graph of the model. Documented in DLmodel.graph.

plot(to_file)

Plots this model's graph. Documented in DLmodel.plot.

load(path, prefix)

Load a model stored in a given path, given file prefix. Documented in DLmodel.load.

save(path, prefix, comment)

Saves the model in a given path, given file prefix. Documented in DLmodel.save.

use_data(use = c("train", "test"), x_files, y_files = NULL, target_windows_per_file = 1024)

Assigns data for training r testing, to be used when fitting the model. Documented in DLmodel.use_data.

fit(epochs = 10, keep_best = TRUE, metrics_viewer = FALSE, ...)

Trains the model. Documented in DLmodel.fit.

reset()

Resets the model to the original (untrained) state. Documented in DLmodel.reset.

infer(V = NULL, speed = c("faster", "medium", "slower"))

Run inference over a volume. Documented in DLmodel.infer.

clone(deep = FALSE)

Clones the model. Documented in DLmodel.clone.

Examples

1

neuroimaginador/dl4ni documentation built on May 3, 2019, 5:47 p.m.