GridDataset
Methods and Attributes¶
Bases: BaseSyntheticDataset
Generates points on a 2D grid within [-range_limit, range_limit].
The total number of samples will be n_samples_per_dim ** 2.
The n_samples
parameter in the base class will be overridden.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
n_samples_per_dim
|
int
|
Number of points along each dimension. Default: 10. |
10
|
range_limit
|
float
|
Defines the square region [-lim, lim] x [-lim, lim]. Default: 1.0. |
1.0
|
noise
|
float
|
Standard deviation of Gaussian noise added. Default: 0.01. |
0.01
|
device
|
Optional[Union[str, device]]
|
Device for the tensor. |
None
|
dtype
|
dtype
|
Data type for the tensor. Default: torch.float32. |
float32
|
seed
|
Optional[int]
|
Random seed (primarily affects noise). |
None
|