## 2 Materials and Methods
### Convolutional Feature Extraction
Figure 4: Examples of the one zebrafish egg (the leftmost patch) and its augmented patches, including rotational augmentation and flipping augmentation. Figure 5: The architecture of the convolutional feature extraction network, where ‘Conv N’ stands for a \(3\times 3\) convolutional layer with N channels, ‘Max Pool’ stands for a \(2\times 2\) max pooling layer. To train this deep convolutional network, the transfer learning strategy was used. The network weights pre-trained on the ImageNet dataset was adopted as the initialization. By using VGG-16 as the initial model, we were able to take advantage of deep features learned from millions of natural images [20]; therefore, the risk of overfitting was further reduced, and the convergence of the training was accelerated. During the training, the weights of the first three blocks of layers were frozen to retain the extracted simple features by VGG-16. Other two blocks of convolutional layers were fine-tuned with a small learning rate to make sure that the magnitude of the updates from each fine-tuning iteration stayed small. For the bottleneck feature training phase, RMSprop optimizer was used for faster general localization. For the fine-tuning phase, Stochastic Gradient Descent (SGD) optimizer with momentum was chosen for better generalization ability. Choosing proper optimizers is crucial since it directly affects the convergence of the algorithm. Both optimizers we chose here originate from the optimizer of Gradient Descent. However, the basic Gradient Descent method calculates the gradient of the whole data set for performing only one update. Therefore, it is extremely slow and memory expensive for experiments with large datasets. Stochastic Gradient Descent (SGD) method was designed to rectify the above problems of the regular Gradient Descent method by performing a parameter update for each training example. To further improve convergence accuracy and reduce fluctuation, a momentum term was added to the SGD method. It restricts the oscillation in one direction during searching to improve the speed of the convergence. Based on the SGD with momentum method, RMSprop optimizer restricts the oscillations in the vertical direction. In this way, a larger learning rate could be adapted to have a larger searching pace in the horizontal direction to increase convergence speed. For bottleneck feature training phase, RMSprop optimizer was used for faster general localization at the beginning. While Stochastic Gradient Descent (SGD) optimizer with momentum was chosen for more precisely global minima localization. Learning rate is one of the most important aspects of Gradient Descent because it determines the pace size for searching the global minima of the optimizing algorithm. Here, a small learning rate of 0.0001 was used to perform fine adjustments to weights without changing the overall weight structure. We used a small learning rate so that the features learned previously were not wrecked. For the training process of each data fold, we ran 50 epochs and saved the best result of model weights at the epoch when the validation loss was the least. The technique of reduced learning rate was used, i.e., the learning rate was multiplied with 0.2 when the training loss stopped reducing for 3 epochs.