Dataset
embedders.s2vec.dataset ¶
S2VecDataset.
This dataset is used to train a S2 masked autoencoder model. As defined in S2Vec paper[1].
References
S2VecDataset ¶
Bases: Dataset['torch.Tensor']
, Generic[T]
Dataset for the S2 masked autoencoder.
It works by returning a 3d tensor of square S2 regions.
PARAMETER | DESCRIPTION |
---|---|
data
|
Data to use for training. Raw counts of features in regions.
TYPE:
|
img_patch_joint_gdf
|
GeoDataFrame with the images and patches
TYPE:
|
Source code in srai/embedders/s2vec/dataset.py
__getitem__ ¶
Return a single item from the dataset.
PARAMETER | DESCRIPTION |
---|---|
index
|
The index of dataset item to return
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Tensor
|
torch.Tensor: The dataset item |
Source code in srai/embedders/s2vec/dataset.py
__len__ ¶
Returns the number of inputs in the dataset.
RETURNS | DESCRIPTION |
---|---|
int
|
Number of inputs in the dataset.
TYPE:
|