fixed dutil/Dataset.Next()

This commit is contained in:
sugarme 2022-03-23 11:59:47 +11:00
parent cc5792ecbf
commit ff85041165
2 changed files with 2 additions and 1 deletions

View File

@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
- Fixed incorrect indexing at `dutil/Dataset.Next()`
- Added `nn.MSELoss()`
## [Nofix]

View File

@ -98,7 +98,7 @@ func (dl *DataLoader) Next() (interface{}, error) {
nextIndex = len(dl.indexes)
}
for i := dl.currIdx; i < nextIndex; i++ {
item, err := dl.dataset.Item(i)
item, err := dl.dataset.Item(dl.indexes[i])
if err != nil {
return nil, err
}