alibi_detect.utils.pytorch.prediction
Functions
predict_batch
predict_batchpredict_batch(x: Union[list, numpy.ndarray, torch.Tensor], model: Union[Callable, torch.nn.modules.module.Module, torch.nn.modules.container.Sequential], device: Union[Literal[cuda, gpu, cpu], torch.device, None] = None, batch_size: int = 10000000000, preprocess_fn: Optional[Callable] = None, dtype: Union[type[numpy.generic], torch.dtype] = <class 'numpy.float32'>) -> Union[numpy.ndarray, torch.Tensor, tuple]Name
Type
Default
Description
predict_batch_transformer
predict_batch_transformerpredict_batch_transformer(x: Union[list, numpy.ndarray], model: Union[torch.nn.modules.module.Module, torch.nn.modules.container.Sequential], tokenizer: Callable, max_len: int, device: Union[Literal[cuda, gpu, cpu], torch.device, None] = None, batch_size: int = 10000000000, dtype: Union[type[numpy.generic], torch.dtype] = <class 'numpy.float32'>) -> Union[numpy.ndarray, torch.Tensor, tuple]Name
Type
Default
Description
Last updated
Was this helpful?

