Conversation
|
Pr получился большой, простите... |
lpetrov02
left a comment
There was a problem hiding this comment.
Я много несущественного написал с пометкой ПОФИГ, а так в целом всё вроде круто
| static std::vector<std::vector<float>> load_csv(std::string path); | ||
| static std::vector<std::pair<std::string, float>> load_labels(std::string path); |
There was a problem hiding this comment.
Кажется, методы можно сделать const
Но тут как хочешь, раз уж мы договорились придерживаться принципа ПОФИГ
| #include "Blob.h" | ||
|
|
||
| DataMarker::DataMarker(std::string path, FileExtension type, int percentage_for_train, std::size_t batch_size) { | ||
| if (percentage_for_train > 100 || percentage_for_train < 0) { |
There was a problem hiding this comment.
А не лучше ли тут float? Вряд ли, конечно, кому-то нужно именно 20,5% на тест, но как будто бы можно сделать более гибко практически бесплатно (ну и в торче/sklearn так сделано))
НО! Так как у нас ПОФИГ, на это можно забить, так тоже норм)
|
|
||
| class UnshuffledImgLoader: public UnshuffledDataLoader { | ||
| private: | ||
| std::vector<std::pair<std::string, float>> data; |
There was a problem hiding this comment.
Вот здесь и в остальных местах тоже: много раз используется вот эта пара, не лучше ли написать структурку с понятными названиями полей?
| auto dims = shape.getDims(); | ||
| int data_size = 1; | ||
| for (int i = 0; i < dims.size(); ++i) { | ||
| data_size *= dims[i]; | ||
| } |
There was a problem hiding this comment.
По-моему, я видел у Shape метод size(), делающий ровно это
| } | ||
| data.resize(data_size, 0); | ||
| int cur_data = 0; | ||
| for (int i = index; i < index + batch_size; ++i) { |
There was a problem hiding this comment.
[ПОФИГ]
Насколько я понимаю, index - это откуда мы читаем батч. Лично мне было бы удобнее подавать номер батча, и тогда цикл выглядел бы как
for (int i = index * batch_size; i < (index + 1) * batch_size; ++i)
Но в целом реально ПОФИГ, лучше оставить как есть, раз работает)
Makes preparations for metrics logging on python Functionality for c++ http added, but not working yet Adds saving train metrics Adds saving train metrics and responding with PNG Adaptates code for new 4D blob cpprest CI support Add load possibility for zip Add load possibility for png on predict ------- GRA-122: Data loader implementation (#67) Data loader implementation ------- ID-154: Loss type selection (#70) * Add loss type selection * Add loss type selection * Remove layer-class loss * Clean up Loss type * Make format ------- ID-171: Fix input selection (#69) * Fix input selection * Clean up fix input selection ------- Change train and predict for zip file case Starts fixing train Fixes train with dataloader It's not fucking working :( (x3) server train fix Fixes train and predcit
Makes preparations for metrics logging on python Functionality for c++ http added, but not working yet Adds saving train metrics Adds saving train metrics and responding with PNG Adaptates code for new 4D blob cpprest CI support Add load possibility for zip Add load possibility for png on predict ------- GRA-122: Data loader implementation (#67) Data loader implementation ------- ID-154: Loss type selection (#70) * Add loss type selection * Add loss type selection * Remove layer-class loss * Clean up Loss type * Make format ------- ID-171: Fix input selection (#69) * Fix input selection * Clean up fix input selection ------- Change train and predict for zip file case Starts fixing train Fixes train with dataloader It's not fucking working :( (x3) server train fix Fixes train and predcit
* Started migration from Data2dLayer to DataLayer Makes preparations for metrics logging on python Functionality for c++ http added, but not working yet Adds saving train metrics Adds saving train metrics and responding with PNG Adaptates code for new 4D blob cpprest CI support Add load possibility for zip Add load possibility for png on predict ------- GRA-122: Data loader implementation (#67) Data loader implementation ------- ID-154: Loss type selection (#70) * Add loss type selection * Add loss type selection * Remove layer-class loss * Clean up Loss type * Make format ------- ID-171: Fix input selection (#69) * Fix input selection * Clean up fix input selection ------- Change train and predict for zip file case Starts fixing train Fixes train with dataloader It's not fucking working :( (x3) server train fix Fixes train and predcit * Follow up review * Follow up review * ID-167: Upload zip (#74) * Fixes graph tests * Fixes DataLayer --------- Co-authored-by: lpetrov02 <lpetrov02@mail.ru> Co-authored-by: Artem Goldenberg <58527023+Artem-Goldenberg@users.noreply.github.com>
* Started migration from Data2dLayer to DataLayer * Makes preparations for metrics logging on python Functionality for c++ http added, but not working yet Adds saving train metrics Adds saving train metrics and responding with PNG * Adaptates code for new 4D blob * cpprest CI support * Add load possibility for zip * Add load possibility for png on predict * GRA-122: Data loader implementation (#67) Data loader implementation * ID-154: Loss type selection (#70) * Add loss type selection * Add loss type selection * Remove layer-class loss * Clean up Loss type * Make format * ID-171: Fix input selection (#69) * Fix input selection * Clean up fix input selection * Change train and predict for zip file case * Starts fixing train * Fixes train with dataloader * It's not fucking working :( * It's not fucking working :( * Input selection bug fix * Started migration from Data2dLayer to DataLayer Makes preparations for metrics logging on python Functionality for c++ http added, but not working yet Adds saving train metrics Adds saving train metrics and responding with PNG Adaptates code for new 4D blob cpprest CI support Add load possibility for zip Add load possibility for png on predict ------- GRA-122: Data loader implementation (#67) Data loader implementation ------- ID-154: Loss type selection (#70) * Add loss type selection * Add loss type selection * Remove layer-class loss * Clean up Loss type * Make format ------- ID-171: Fix input selection (#69) * Fix input selection * Clean up fix input selection ------- Change train and predict for zip file case Starts fixing train Fixes train with dataloader It's not fucking working :( (x3) server train fix Fixes train and predcit * Follow up review * Follow up review * Make formats * Fix bug (not deleting connection after deleting layer) * Minor changes in cpp_server * tests fix * Fix order of addition inputs in layer --------- Co-authored-by: lpetrov02 <lpetrov02@mail.ru> Co-authored-by: Artem Goldenberg <st087953@student.spbu.ru> Co-authored-by: MaxVorosh <ma_voroshilov@mail.ru> Co-authored-by: Voroshilov Maksim <47945698+MaxVorosh@users.noreply.github.com>
GRA-122