Skip to content
Discussion options

You must be logged in to vote

They only slightly differ. I'm not really sure how you implement it via batch, but slices lets you access individual examples in O(1). Furthermore, since data is only sliced, it will not need to duplicate the output data in memory:

x = dataset.data.x[100:150]  # x holds the same underlying memory as dataset.data.x

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mdanb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants