From 7b494c8333f5d0bdbec0d93376339b79d1f07909 Mon Sep 17 00:00:00 2001 From: Yinon Polak Date: Mon, 3 Apr 2023 16:39:49 +0300 Subject: [PATCH] add documentation to pytorch data convertor --- freqtrade/freqai/torch/PyTorchDataConvertor.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/freqtrade/freqai/torch/PyTorchDataConvertor.py b/freqtrade/freqai/torch/PyTorchDataConvertor.py index 1070b0fb5..5982a1b48 100644 --- a/freqtrade/freqai/torch/PyTorchDataConvertor.py +++ b/freqtrade/freqai/torch/PyTorchDataConvertor.py @@ -31,6 +31,12 @@ class DefaultPyTorchDataConvertor(PyTorchDataConvertor): target_tensor_type: Optional[torch.dtype] = None, squeeze_target_tensor: bool = False ): + """ + :param target_tensor_type: type of target tensor, for classification use + torch.long, for regressor use torch.float or torch.double. + :param squeeze_target_tensor: controls the target shape, used for loss functions + that requires 0D or 1D. + """ self._target_tensor_type = target_tensor_type self._squeeze_target_tensor = squeeze_target_tensor