Skip to content

Commit

Permalink
compatability change, torch._six not supported (NVIDIA/apex#1724)
Browse files Browse the repository at this point in the history
  • Loading branch information
C-Earl committed Sep 3, 2024
1 parent 6a49ceb commit 7f0cf10
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions bindsnet/pipeline/base_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from typing import Tuple, Dict, Any

import torch
from torch._six import string_classes
import collections

from ..network import Network
Expand All @@ -23,7 +22,7 @@ def recursive_to(item, device):

if isinstance(item, torch.Tensor):
return item.to(device)
elif isinstance(item, (string_classes, int, float, bool)):
elif isinstance(item, (str, int, float, bool)):
return item
elif isinstance(item, collections.Mapping):
return {key: recursive_to(item[key], device) for key in item}
Expand Down

0 comments on commit 7f0cf10

Please sign in to comment.