Upload feature_extraction_moment.py
Browse files
feature_extraction_moment.py
CHANGED
@@ -42,10 +42,10 @@ class MomentFeatureExtractor(FeatureExtractionMixin):
|
|
42 |
return_tensors: Optional[Union[str, TensorType]] = TensorType.PYTORCH,
|
43 |
torch_dtype: Optional[Union[str, torch.dtype]] = torch.float,
|
44 |
padding: Union[bool, str] = False, # 追加
|
45 |
-
max_length: int = None, # 追加
|
46 |
) -> BatchFeature:
|
47 |
if time_series is not None:
|
48 |
-
time_series_values, input_mask = self._convert_time_series(time_series, return_tensors, torch_dtype, max_length)
|
49 |
else:
|
50 |
time_series_values = None
|
51 |
input_mask = None
|
|
|
42 |
return_tensors: Optional[Union[str, TensorType]] = TensorType.PYTORCH,
|
43 |
torch_dtype: Optional[Union[str, torch.dtype]] = torch.float,
|
44 |
padding: Union[bool, str] = False, # 追加
|
45 |
+
max_length: Union[int, None] = None, # 追加
|
46 |
) -> BatchFeature:
|
47 |
if time_series is not None:
|
48 |
+
time_series_values, input_mask = self._convert_time_series(time_series, return_tensors, torch_dtype, padding, max_length)
|
49 |
else:
|
50 |
time_series_values = None
|
51 |
input_mask = None
|