@@ -46,52 +46,54 @@ class KNP_DECLSPEC Dataset final : public classification::Dataset
4646 * @brief Process labels and images, converting the images to spike form and creating data pairs.
4747 * @param images_stream stream containing the raw image data.
4848 * @param labels_stream stream containing the corresponding labels.
49- * @param training_amount desired number of images to use for training .
49+ * @param max_images_amount maximum amount of images that should be processed .
5050 * @param classes_amount total number of classes in the dataset.
5151 * @param image_size size of each image in bytes.
5252 * @param steps_per_image number of steps required to transmit an image in spike form to a model.
5353 * @param image_to_spikes function that converts raw image data to spike form, returning a `Frame` object.
54- * @details This method reads images and labels from the provided streams, converts each image to spike form
55- * using the provided converter function, and creates data pairs consisting of the label and spike frame.
54+ * @details This method reads images and labels from the provided streams, converts each image to spike form
55+ * using the provided converter function, and creates data pairs consisting of the label and spike frame.
5656 * The data pairs are added to the training dataset.
5757 */
5858 void process_labels_and_images (
59- std::istream &images_stream, std::istream &labels_stream, size_t training_amount , size_t classes_amount,
59+ std::istream &images_stream, std::istream &labels_stream, size_t max_images_amount , size_t classes_amount,
6060 size_t image_size, size_t steps_per_image,
6161 std::function<Frame(std::vector<uint8_t > const &)> const &image_to_spikes);
6262
6363 /* *
6464 * @brief Create a generator that produces spike data from training labels.
6565 * @return functor for generating spikes from training labels.
66- * @details The generated spike data is created by iterating over the training labels in a loop, with each label repeated at regular intervals.
66+ * @details The generated spike data is created by iterating over the training labels in a loop, with each label
67+ * repeated at regular intervals.
6768 */
6869 [[nodiscard]] std::function<knp::core::messaging::SpikeData(knp::core::Step)> make_training_labels_generator ()
6970 const ;
7071
7172 /* *
7273 * @brief Create a generator that produces spike data from training images.
7374 * @return functor for generating spikes from training images.
74- * @details The spike data is generated by iterating over the training images in a looped manner, where each image is divided into
75- * frames. For each frame, the corresponding spike data is extracted and returned.
75+ * @details The spike data is generated by iterating over the training images in a looped manner, where each image
76+ * is divided into frames. For each frame, the corresponding spike data is extracted and returned.
7677 */
7778 [[nodiscard]] std::function<knp::core::messaging::SpikeData(knp::core::Step)>
7879 make_training_images_spikes_generator () const ;
7980
8081 /* *
8182 * @brief Create a generator that produces spike data from inference images.
8283 * @return functor for generating spikes from inference images.
83- * @details The spike data is generated by iterating over the inference images in a looped manner, where each image is divided into
84- * frames. For each frame, the corresponding spike data is extracted and returned.
84+ * @details The spike data is generated by iterating over the inference images in a looped manner, where each image
85+ * is divided into frames. For each frame, the corresponding spike data is extracted and returned.
8586 */
8687 [[nodiscard]] std::function<knp::core::messaging::SpikeData(knp::core::Step)>
8788 make_inference_images_spikes_generator () const ;
8889
8990 /* *
9091 * @brief Create an incrementing image to spikes converter.
91- * @details This converter generates spikes based on the input image data, considering the specified number of active steps
92- * and the state increment factor. Spikes are sent for the active steps, and no spikes are sent for the remaining steps
93- * until the total steps per image (@ref steps_per_frame_) are reached.
94- * @param active_steps number of active steps, which must be less than the total steps per image (@ref steps_per_frame_).
92+ * @details This converter generates spikes based on the input image data, considering the specified number of
93+ * active steps and the state increment factor. Spikes are sent for the active steps, and no spikes are sent for the
94+ * remaining steps until the total steps per image (@ref steps_per_frame_) are reached.
95+ * @param active_steps number of active steps, which must be less than the total steps per image (@ref
96+ * steps_per_frame_).
9597 * @param state_increment_factor factor by which the state is incremented for each input value.
9698 * @return functor that converts raw image data to spikes.
9799 */
0 commit comments