realtabformer.rtf_datacollator
#
Module Contents#
Classes#
Data collator that will dynamically pad the inputs received, as well as the labels. |
- class realtabformer.rtf_datacollator.RelationalDataCollator[source]#
Data collator that will dynamically pad the inputs received, as well as the labels. Adopted from the DataCollatorForSeq2Seq:
- Parameters:
max_length (int, optional) – Maximum length of the returned list and optionally padding length (see above).
pad_to_multiple_of (int, optional) – If set will pad the sequence to a multiple of the provided value. This is especially useful to enable the use of Tensor Cores on NVIDIA hardware with compute capability >= 7.5 (Volta).
label_pad_token_id (int, optional, defaults to -100) – The id to use when padding the labels (-100 will be automatically ignored by PyTorch loss functions).
return_tensors (str) – The type of Tensor to return. Allowable values are “np”, “pt” and “tf”.