pytorch / tnt

A lightweight library for PyTorch training tools and utilities
https://pytorch.org/tnt/
Other
1.66k stars 271 forks source link

Duplicate classes for Datasets #13

Closed chsasank closed 2 years ago

chsasank commented 7 years ago

We have two base classes for datasets both in pytorch and torchnet.

  1. torch.utils.data.Dataset
  2. tochnet.dataset.Dataset

This is also the case for TensorDataset. This is potentially confusing for a new user. I had to look up the code to see if there's any relation or difference between the two versions.

My proposal for solving this is:

  1. Use torch.utils.data.Dataset as baseclass for all the datasets in tnt. This might mean foregoing of batch, transform etc. methods, but I think they're actually confusing anyway.
  2. Copy the code tochnet.dataset.TensorDataset to torch.utils.data.TensorDataset and ditch tochnet.dataset.TensorDataset

Sasank.

apaszke commented 7 years ago

I agree this is confusing and we've been planning to discuss that next week. Sorry for that.

Thanks for the suggestions!