Skip to content
Snippets Groups Projects
Commit 459cfe05 authored by Mateusz Klimaszewski's avatar Mateusz Klimaszewski
Browse files

Change tensor constructor.

parent bbf32308
Branches
No related merge requests found
Pipeline #2930 passed with stage
in 7 minutes and 4 seconds
......@@ -204,7 +204,7 @@ class UniversalDependenciesDatasetReader(allen_data.DatasetReader):
default_value = [0.0] * classes_count
padded_tags = util.pad_sequence_to_length(field._indexed_multi_labels, desired_num_tokens,
lambda: default_value)
tensor = torch.LongTensor(padded_tags)
tensor = torch.tensor(padded_tags, dtype=torch.long)
return tensor
return as_tensor
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment