dgs.utils.typesΒΆ

definition of regularly used types

Module Attributes

Config

A nested configuration, describing a module or the whole tracker.

NodePath

A list of key-names used for traversing through a config.

FilePath

The path to a file or directory.

FilePaths

Multiple FilePaths as tuple.

Validator

A function for validating a value of a Config object.

Validations

A dictionary of validations, mapping a value of a given Config to some sort of validation.

DataGetter

Function to extract a single specific value from a State.

DataGetters

Function to extract multiple attributes or properties from a State.

Instance

An instance to be loaded is either the name of that instance or a class-type.

Metric

A module or function that computes a metric.

Loss

A module or function that computes a loss.

Scheduler

A Scheduler used to update the learning rate during training.

Results

A dictionary of results, as name->metric or name->iterable of metrics.

Device

A Torch device, either descriptive string (e.g. 'cpu') or a regular torch.device object.

Video

A tensor based video, either torchvision or regular tensor.

Image

A tensor based image with shape [B x C x H x W].

Images

A list with length B, containing Images with shape [1 x C x H x W].

Heatmap

Heatmap as mask with shape [(B x) J x h x w].

ImgShape

Shape of an image as tuple like (height, width).