Custom datasets
See original GitHub issueDescription
I followed the description to create a custom dataset here This one does not seem to be up to date.
Context
So that others avoids this problem by following the above example.
Possible Implementation
I needed to run the init of the inherrited class AbstractVersionedDataSet to get this working:
def __init__(self, filepath: str, version: Version = None):
"""Creates a new instance of SimulationDataSet to load / save simulation results (hff5-files) from Seaman at the given filepath.
Args:
filepath: The location of the simulation file to load / save data.
"""
super().__init__(
filepath=PurePosixPath(filepath),
version=version,
)
Possible Alternatives
I or someone else could perhaps update the example similar to the suggestion above?
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Writing Custom Datasets, DataLoaders and Transforms
utils.data.Dataset is an abstract class representing a dataset. Your custom dataset should inherit Dataset and override the following methods:.
Read more >Creating a custom Dataset and Dataloader in Pytorch - Medium
Creating a custom Dataset and Dataloader in Pytorch · The Torch Dataset class is basically an abstract class representing the dataset. · The...
Read more >04. PyTorch Custom Datasets
PyTorch has many built-in datasets used for a wide number of machine learning benchmarks, however, you'll often want to use your own custom...
Read more >Custom dataset in Pytorch —Part 1. Images | by Utkarsh Garg
In this walkthrough, we'll learn how to load a custom image dataset for classification. The code for this walkthrough can also be found...
Read more >How You can EASILY create Custom Datasets and Loaders!
Pytorch has some of the best tools to load your data and create datasets on the fly. We will cover examples of creating...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Aha then I guess that it works, if you say so, thanks! By the way if I want to install “latest” instead of “stable” can I do that from pypi or should I get it from GitHub instead?
@martinlarsalbert the difference is that in the latest documentation the dataset inherits from
AbstractDataSet
rather thanAbstractVersionedDataSet
.AbstractDataSet
doesn’t define an__init__
, so no need to dosuper().__init__
.Don’t worry about the commit, it’s not related - the notification is just an artefact of the way we sync between different repositories.