# Epoch Count and Capacity

The ViDi framework provides two general parameters that you can use to influence the training process: The Epoch Count and the Capacity (Red Analyze tool in Unsupervised Mode only) parameters.

The Epoch Count parameter lets you control how much network refinement is performed. As described in the Neural Network Training topic, the training process repeatedly processes input samples through the network, compares the network result with the user-supplied labeling, then adjusts the network weights with a goal of reducing this error. Because of the large number of network nodes (and thus weights), this process can be repeated almost indefinitely, with each iteration resulting in a progressively smaller improvement in the error. Increasing the Epoch Count parameter setting increases the number of iterations of training that are performed. This will reduce the network error on the training images at the cost of requiring more time for training.

It is important to keep in mind, however, that the goal for training the network is to perform accurately on all images, not just those used for training. As the epoch count is increased, the network will tend to experience overfitting, where the error on untrained images increases at the same time that the error on trained images decreases. For this reason, you should carefully monitor the network performance on all images as you adjust the epoch count.

The Red Analyze tool in Unsupervised Mode also exposes the Capacity parameter. In general, neural network capacity is a measure of the amount of information that can be encoded (learned) by the network. The ViDi network architecture is less capacity constrained for the Blue Locate, Blue Read, Green Classify and Red Analyze (in Supervised Mode) tools, because these tools process individual samples through the trained network. The Red Analyze tool in Unsupervised Mode uses a different network architecture that allows it to detect untrained defects in the entire image. For some high-complexity images, the tool may under-fit whereas for some low-complexity images, the tool may over-fit. Therefore, the tool response can be optimized on a given image set by choosing the appropriate network capacity.