-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Support generator-like data loader as PyTorch/libtorch #281
base: develop
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #281 +/- ##
===========================================
- Coverage 79.95% 79.79% -0.17%
===========================================
Files 37 37
Lines 1751 1737 -14
===========================================
- Hits 1400 1386 -14
Misses 270 270
Partials 81 81
Continue to review full report at Codecov.
|
torch.GC() | ||
e.hasGCed = true | ||
} | ||
torch.SetTensorFinalizer(e.data.T) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By calling torch.SetTensorFinalizer
in Example.Data/Target
, could we fix the bug #273 ? @shendiaomo @Yancey1989
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems this PR works with the C++ wrappered dataset, #273 using ImageLoader
which is Go implementation, it seems this PR can not fix it.
// for batch := range Loader(myDataset) { | ||
// ... | ||
// } | ||
func Loader(dataset Dataset) chan Example { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a correct direction -- to use Go channel.
range for
like PyTorch and the C++ frontend