Skip to content

Commit 4552e91

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent ca95b8f commit 4552e91

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

torch_frame/utils/skorch.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@
33
# TODO: make it more safe
44
old_to_tensor = skorch.utils.to_tensor
55

6+
67
def to_tensor(X, device, accept_sparse=False):
78
if isinstance(X, TensorFrame):
89
return X
910
return old_to_tensor(X, device, accept_sparse)
1011

12+
1113
skorch.utils.to_tensor = to_tensor
1214
import importlib
15+
1316
importlib.reload(skorch.net)
1417

1518
from typing import Any

0 commit comments

Comments
 (0)