ClassificationService constructor

ClassificationService({
  1. required PytorchWrapper pytorchWrapper,
})

Creates a new classification service with the provided PyTorch wrapper.

The pytorchWrapper parameter is required and provides the interface to the underlying PyTorch Lite functionality. This design enables dependency injection and makes the service testable.

Example:

final service = ClassificationService(
  pytorchWrapper: PytorchWrapper(),
);

Implementation

ClassificationService({required PytorchWrapper pytorchWrapper})
    : _pytorchWrapper = pytorchWrapper;