Training

The Training components provide different methods to train the model with. A Training component is invoked by PerceptiLabs when you instruct the tool to start training. As such, a Training component is the last component in a model's graph topology which ties the whole model together.

Common Hyperparameters

Many of the Training components have the same hyperparameters. Below are the definitions for common hyperparameters found in multiple components:

  • Additional Stop Condition: allows you to specify an additional condition for when to stop training. Selecting Target Accuracy displays an edit field where you can specify a training accuracy percentage threshold, after which training will stop.

  • Batch Size: the number of samples that the algorithm should train on at a time, before updating the weights in the model. Higher values will speed up the training and may make your model generalize better. However, too high of values may prevent your model from learning the data.

  • Beta 1: optimizer-specific parameter. See the TensorFlow Optimizers page for optimizer-specific definitions.

    Beta 2: optimizer-specific parameter. See the TensorFlow Optimizers page for optimizer-specific definitions.

  • Epochs: sets the number of epochs to perform. One epoch corresponds to the number of iterations it takes to go through the entire dataset one time. The higher the number, the better the model will learn your training data. Note that training too long may overfit your model to your training data.

  • Learning rate: sets the learning rate for the algorithm. The value must be between 0 and 1 (default is 0.001). The higher the value, the quicker your model will learn. If the value is too high, training can skip over good local minimas. If the value is too low, training can get stuck in a poor local minima.

  • Loss function: specifies which loss function to apply.

  • Optimizer: specifies which optimizer algorithm to use for the model. The optimizer continually tries new weights and biases during training until it reaches its goal of finding the optimal values for the model to make accurate predictions. Optimizers available in PerceptiLabs' Training components include: ADAM, Stochastic gradient descent (SGD), Adagrad, Momentum, and RMSprop.

Classification

Performs classification (e.g., image classification) given a set of predictions and labels.

The component's predictions input socket is often connected to a Dense component which provides predictions, while the labels input socket may be connected directly to a Data component which supplies labels, or an intermediate OneHot component that first removes ordinality of those labels.

See Basic Image Recognition tutorial for an example of using the Classification component.

Parameters:

Regression

Attempts to find a line of "best fit" on a group of points in a space. The goal is to predict the output of a continuous value (e.g., a price or a probability). For more information about regression see this TensorFlow topic.

Parameters:

Reinforcement Learning

Adds the ability to train a model using a reinforcement learning algorithm.

Parameters:

  • Method: specifies which reinforcement learning method to use. Currently only Q-learning is supported.

  • Optimizer: see definition in Common Hyperparameters above.

  • History length: specifies how many frames there should be inside each sample.

  • Batch size: see definition in Common Hyperparameters above.

  • Learning rate: see definition in Common Hyperparameters above.

  • Max steps: specifies how many steps the agent is allowed to take before a Done state is enforced.

  • Episodes: specifies how many episodes the algorithm will run before the training ends. An episode transitions into a new one whenever a Done state is received and is a way of defining how long the training will run. For example, if one training session consists of 15 episodes where reinforcement learning is training on a game, then the agent will have won, lost, or reached the maximum steps 15 times before the training ends.

GAN

Adds the ability to train a Generative Adversarial Network (GAN). See the GAN Tutorial for an example of creating this type of model.

The component's input socket is often connected to a Dense component which provides the current prediction from the generator and discriminator parts of the model.

Parameters:

  • Switch: specifies which Switch component in the model to use for switching between the generator and discriminator parts of the model. This dropdown will only be populated if one or more Switch components exist in the model workspace.

  • Real Data: specifies the Data component that contains the "real" data to imitate. This dropdown will only be populated if one or more Data components exist in the model workspace.

  • Epochs: see definition in Common Hyperparameters above.

  • Optimizer: see definition in Common Hyperparameters above.

  • Beta 1: see definition in Common Hyperparameters above.

  • Beta 2: see definition in Common Hyperparameters above.

  • Learning Rate: see definition in Common Hyperparameters above.

  • Batch Size: see definition in Common Hyperparameters above.

  • Additional Stop Condition: see definition in Common Hyperparameters above.

Object Detection

Adds the ability to perform object detection.

Parameters:

  • Epochs: see definition in Common Hyperparameters above.

  • Grid Size: the size that the grid image is divided into for the Yolo V1 model.

  • Batch Size: see definition in Common Hyperparameters above.

  • Number of Boxes: the number of predicted bounding boxes per object by the Yolo V1 model.

  • Threshold: the lower threshold on the probability for boundary boxes.

  • λclassification: the coefficient of loss corresponding to the object detection loss in the Yolo V1 model.

  • λnon object: the coefficient of loss corresponding to the non-object detection loss in the Yolo V1 model.

  • Optimizer: specifies which optimizer algorithm to use.

  • Beta 1: see definition in Common Hyperparameters above.

  • Beta 2: see definition in Common Hyperparameters above.

  • Learning Rate: see definition in Common Hyperparameters above.

  • Additional Stop Condition: see definition in Common Hyperparameters above.

Last updated