Skip to content

Commit

Permalink
Merge pull request #12 from plstcharles/pytorch-version
Browse files Browse the repository at this point in the history
parse extra cuda info in pytorch version
  • Loading branch information
plstcharles committed Jun 4, 2020
2 parents 73507a6 + 7162fff commit 9e45e45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion thelper/data/loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def default_collate(batch, force_tensor=True):
"""
from torch._six import container_abcs, string_classes, int_classes
error_msg_fmt = "batch must contain tensors, numbers, dicts or lists; found {}"
torch_ver = [int(v) for v in torch.__version__.split(".")]
torch_ver = [int(v) for v in torch.__version__.split('+')[0].split(".")] # format: X.Y.Z[+cu101]
elem_type = type(batch[0])
if any([b is None for b in batch]):
assert all([b is None for b in batch]), "cannot mix ``None`` and non-``None`` types"
Expand Down

0 comments on commit 9e45e45

Please sign in to comment.