kitcar_ml.onboarding package

Submodules

kitcar_ml.onboarding.model module

Classes:

OnboardingNet()

Neural network class.

class OnboardingNet[source]

Bases: Module

Neural network class.

The forward() defines how images are passed through the network.

Methods:

forward(x)

Handle input.

load(path)

Load model parameters from file.

save(path)

Save model parameters to file.

Attributes:

forward(x: Tensor) Tensor[source]

Handle input.

Parameters

x – Input image

Returns

Output class as 10-dimensional tensor.

load(path: str)[source]

Load model parameters from file.

Parameters

path – Path to file

save(path: str)[source]

Save model parameters to file.

Parameters

path – Path to file

training: bool
_parameters: Dict[str, Optional[Parameter]]
_buffers: Dict[str, Optional[Tensor]]
_non_persistent_buffers_set: Set[str]
_backward_hooks: Dict[int, Callable]
_is_full_backward_hook: Optional[bool]
_forward_hooks: Dict[int, Callable]
_forward_pre_hooks: Dict[int, Callable]
_state_dict_hooks: Dict[int, Callable]
_load_state_dict_pre_hooks: Dict[int, Callable]
_load_state_dict_post_hooks: Dict[int, Callable]
_modules: Dict[str, Optional[Module]]

kitcar_ml.onboarding.script module

Functions:

get_dataloader(label_file[, batch_size])

Create a dataloader.

train(model, label_file[, epochs])

Train the OnboardingNet on the provided dataset.

test(model, label_file)

Test the OnboardingNet on the provided dataset.

get_dataloader(label_file: str, batch_size: int = 16) BaseDataLoader[source]

Create a dataloader.

Returns

Labeled dataloader object that can be used to load training/test data.

train(model: Module, label_file: str, epochs: int = 10)[source]

Train the OnboardingNet on the provided dataset.

Parameters
  • model – The model to train.

  • label_file – Path to the train yaml label file.

  • epochs – Number of epochs to train.

test(model: Module, label_file: str)[source]

Test the OnboardingNet on the provided dataset.

Parameters
  • model – The model to test.

  • label_file – Path to the test yaml label file.

kitcar_ml.onboarding.setup module

Module contents