NeuralTSNE.Utils.Writers.LabelWriters package
Submodules
NeuralTSNE.Utils.Writers.LabelWriters.label_writers module
- save_labels_data(args: dict, test: DataLoader) None [source]View on GitHub
Save labels data to a new file.
- Parameters:
args (dict) – Dictionary containing arguments, including the output file path (o).
test (DataLoader) – DataLoader for the test dataset.
Note
This function saves the labels data to a new file with a name based on the original output file path.
- save_torch_labels(output: str, test: Dataset) None [source]View on GitHub
Save labels from a torch.Dataset to a text file.
The function extracts labels from the provided test dataset and saves them to a text file. The output file is named based on the provided output parameter.
- Parameters:
output (str) – The output file path for saving labels.
test (Dataset) – The torch.Dataset containing labels to be saved.
Note
The function iterates through the test dataset, extracts labels, and saves them to a text file.
The output file is named by appending “_labels.txt” to the output parameter, removing the file extension if present.