Module view.NetworkTrainer

Widget that allows the user to define the layers of a neural network.

Functions

NetworkTrainer.new (ctrl, parent) Constructor.
NetworkTrainer:clear () Clears the training status (interface only, doesn't changed the network)
NetworkTrainer:run (project) Runs the dialog.
NetworkTrainer:training_callback (max_epochs, rep_epochs, target, cur_epoch) Training callback.
NetworkTrainer:update_status (epoch, epochs) Updates the training status, based on parameters of the current network.
(private) NetworkTrainer:add_status_ui ()
(private) NetworkTrainer:add_stop_conditions_ui ()
(private) NetworkTrainer:build_gui (parent) Builds the interface.
(private) NetworkTrainer:clear_reports () Clears the stored report information (MSE, weights).
(private) NetworkTrainer:create_plot_dialog ()
(private) NetworkTrainer:prepare (project) Prepares the dialog.
(private) NetworkTrainer:queue_update () Queues a GUI update.
(private) NetworkTrainer:show_bit_dialog ()
(private) NetworkTrainer:show_mse_dialog ()
(private) NetworkTrainer:show_weight_dialog ()
(private) NetworkTrainer:start_training () Starts the training.
(private) NetworkTrainer:stop_training () Stops the training (queue it, the training only stops on the next iteration).
(private) calculate_interval (net, data) Estimates a good epochs_between_reports param, based on the size of the training data and the number of connections in the network.


Functions

NetworkTrainer.new (ctrl, parent)
Constructor.

Parameters

  • ctrl: Application controller, used to emit events
  • parent: Parent window

Return value:

New instance of NetworkTrainer
NetworkTrainer:clear ()
Clears the training status (interface only, doesn't changed the network)
NetworkTrainer:run (project)
Runs the dialog.

Parameters

  • project: Project to use the network and training data
NetworkTrainer:training_callback (max_epochs, rep_epochs, target, cur_epoch)
Training callback. Since the training occurs in the same thread as the interface, we process the pending main loop events here.

Parameters

  • max_epochs:
  • rep_epochs:
  • target:
  • cur_epoch:
NetworkTrainer:update_status (epoch, epochs)
Updates the training status, based on parameters of the current network.

Parameters

  • epoch:
  • epochs: Current epoch (optional)
(private) NetworkTrainer:add_status_ui ()
(private) NetworkTrainer:add_stop_conditions_ui ()
(private) NetworkTrainer:build_gui (parent)
Builds the interface.

Parameters

  • parent: Parent window
(private) NetworkTrainer:clear_reports ()
Clears the stored report information (MSE, weights).
(private) NetworkTrainer:create_plot_dialog ()
(private) NetworkTrainer:prepare (project)
Prepares the dialog.

Parameters

  • project:
(private) NetworkTrainer:queue_update ()
Queues a GUI update. Used to avoid the useless concentration of events in the same callback.
(private) NetworkTrainer:show_bit_dialog ()
(private) NetworkTrainer:show_mse_dialog ()
(private) NetworkTrainer:show_weight_dialog ()
(private) NetworkTrainer:start_training ()
Starts the training.
(private) NetworkTrainer:stop_training ()
Stops the training (queue it, the training only stops on the next iteration).
(private) calculate_interval (net, data)
Estimates a good epochs_between_reports param, based on the size of the training data and the number of connections in the network.

Parameters

  • net: Network to be used in the training
  • data: Data to be used in the training

Return value:

Report interval, an integer between 1 and 1000

Valid XHTML 1.0!