Skip to content
Snippets Groups Projects
Commit 7f85a75c authored by Olivier BICHLER's avatar Olivier BICHLER
Browse files

Fixed bug with dropLast

parent 5b2d9b4b
No related branches found
No related tags found
2 merge requests!152Update Aidge export to take a graph view has an argument instead of a...,!128Use the ordered nodes API in Sequential() in order to preserve the user declaration nodes order
Pipeline #47011 passed
...@@ -42,8 +42,8 @@ Aidge::DataProvider::DataProvider(const Aidge::Database& database, const std::si ...@@ -42,8 +42,8 @@ Aidge::DataProvider::DataProvider(const Aidge::Database& database, const std::si
// Compute the number of bacthes depending on mDropLast boolean // Compute the number of bacthes depending on mDropLast boolean
mNbBatch = (mDropLast) ? mNbBatch = (mDropLast) ?
static_cast<std::size_t>(std::floor(mNbItems / mBatchSize)) : (mNbItems / mBatchSize) :
static_cast<std::size_t>(std::ceil(mNbItems / mBatchSize)); static_cast<std::size_t>(std::ceil(mNbItems / static_cast<float>(mBatchSize)));
} }
std::vector<std::shared_ptr<Aidge::Tensor>> Aidge::DataProvider::readBatch() const std::vector<std::shared_ptr<Aidge::Tensor>> Aidge::DataProvider::readBatch() const
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment