You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/tutorials/task_transform_tutorial/transform_tutorial.md
+8-8
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ In this tutorial, we will explore in depth one of the core utilities [learn2lear
11
11
* We will first discuss the motivation behind generating tasks. *(Those familiar with meta-learning can skip this section.)*
12
12
* Next, we will have a high-level overview of the overall pipeline used for generating tasks using `learn2learn`.
13
13
*`MetaDataset` is used fast indexing, and accelerates the process of generating few-shot learning tasks. `UnionMetaDataset` and `FilteredMetaDataset` are extensions of `MetaDataset` that can further provide customised utility. `UnionMetaDataset` builds up on `MetaDataset` to construct a union of multiple input datasets, and `FilteredMetaDataset` takes in a `MetaDataset` and filters it to include only the required labels.
14
-
*`TaskDataset` is the core module that generates tasks from input dataset. Tasks are lazily sampled upon indexing or calling `.sample()` method.
14
+
*`Taskset` is the core module that generates tasks from input dataset. Tasks are lazily sampled upon indexing or calling `.sample()` method.
15
15
* Lastly, we study different `task transforms` defined in `learn2learn` that modifies the input data such that a customised `task` is generated.
16
16
17
17
## Motivation for generating tasks
@@ -109,7 +109,7 @@ transforms = [
109
109
]
110
110
111
111
# 5. Generate set of tasks using the dataset, and transforms
112
-
taskset = l2l.data.TaskDataset(dataset=omniglot, task_transforms=transforms, num_tasks=10) # Creates sets of tasks from the dataset
112
+
taskset = l2l.data.Taskset(dataset=omniglot, task_transforms=transforms, num_tasks=10) # Creates sets of tasks from the dataset
This is one of the core module of `learn2learn` that is used to generate a task from a given input dataset. It takes `dataset`, and list of `task transformations` as arguments. The task transformation basically define the kind of tasks that will be generated from the dataset. (For example, `KShots` transform limits the number of samples per class in a task to `K` samples per class.)
278
278
279
279
> If there are no task transforms, then the task consists of all the samples in the entire dataset.
280
280
281
-
Another argument that `TaskDataset` takes as input is `num_tasks`*(an integer value)*. The value is set depending on how many tasks the user wants to generate. By default, it is kept as `-1`, meaning infinite number of tasks will be generated, and a new task is generated on sampling. In the former case, the descriptions of the task will be cached in a dictionary such that if a given task is called again, the description can be loaded instantly rather than generating it once again.
281
+
Another argument that `Taskset` takes as input is `num_tasks`*(an integer value)*. The value is set depending on how many tasks the user wants to generate. By default, it is kept as `-1`, meaning infinite number of tasks will be generated, and a new task is generated on sampling. In the former case, the descriptions of the task will be cached in a dictionary such that if a given task is called again, the description can be loaded instantly rather than generating it once again.
282
282
283
283
#### What is a task description?
284
284
@@ -627,7 +627,7 @@ toy_transforms = [
627
627
ConsecutiveLabels(omniglot), # Re-orders samples s.t. they are sorted in consecutive order
628
628
RandomClassRotation(omniglot, [0, 90, 180, 270]) # Randomly rotate sample over x degrees (only for vision tasks)
0 commit comments