Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
ae6b134c
"vscode:/vscode.git/clone" did not exist on "e7696e20f9a932bad2d462d4f7cc9cf0b5000c02"
Unverified
Commit
ae6b134c
authored
Dec 22, 2023
by
Sergii Dymchenko
Committed by
GitHub
Dec 22, 2023
Browse files
Pass use_reentrant for checkpoint (#8180)
parent
26fb5efe
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
torchvision/models/densenet.py
torchvision/models/densenet.py
+1
-1
No files found.
torchvision/models/densenet.py
View file @
ae6b134c
...
@@ -61,7 +61,7 @@ class _DenseLayer(nn.Module):
...
@@ -61,7 +61,7 @@ class _DenseLayer(nn.Module):
def
closure
(
*
inputs
):
def
closure
(
*
inputs
):
return
self
.
bn_function
(
inputs
)
return
self
.
bn_function
(
inputs
)
return
cp
.
checkpoint
(
closure
,
*
input
)
return
cp
.
checkpoint
(
closure
,
*
input
,
use_reentrant
=
False
)
@
torch
.
jit
.
_overload_method
# noqa: F811
@
torch
.
jit
.
_overload_method
# noqa: F811
def
forward
(
self
,
input
:
List
[
Tensor
])
->
Tensor
:
# noqa: F811
def
forward
(
self
,
input
:
List
[
Tensor
])
->
Tensor
:
# noqa: F811
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment