(
self,
data: Optional[Dict[str, Any]] = None,
encoding: Optional[Union[EncodingFast, Sequence[EncodingFast]]] = None,
tensor_type: Union[None, str, TensorType] = None,
prepend_batch_axis: bool = False,
)
| 143 | """ |
| 144 | |
| 145 | def __init__( |
| 146 | self, |
| 147 | data: Optional[Dict[str, Any]] = None, |
| 148 | encoding: Optional[Union[EncodingFast, Sequence[EncodingFast]]] = None, |
| 149 | tensor_type: Union[None, str, TensorType] = None, |
| 150 | prepend_batch_axis: bool = False, |
| 151 | ): |
| 152 | super().__init__(data) |
| 153 | |
| 154 | if isinstance(encoding, EncodingFast): |
| 155 | encoding = [encoding] |
| 156 | |
| 157 | self._encodings = encoding |
| 158 | |
| 159 | self.convert_to_tensors(tensor_type=tensor_type, prepend_batch_axis=prepend_batch_axis) |
| 160 | |
| 161 | @property |
| 162 | def is_fast(self): |
no test coverage detected