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
fairscale
Commits
f5ab9a18
Unverified
Commit
f5ab9a18
authored
Jan 27, 2021
by
Benjamin Lefaudeux
Committed by
GitHub
Jan 27, 2021
Browse files
[fix] Fixing some docstrings which did not pass CI (#330)
* docfix
parent
cae9b638
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
fairscale/nn/pipe/pipe.py
fairscale/nn/pipe/pipe.py
+8
-10
No files found.
fairscale/nn/pipe/pipe.py
View file @
f5ab9a18
...
...
@@ -202,7 +202,7 @@ class Pipe(Module):
``'except_last'``, or ``'never'`` (default: ``'except_last'``)
deferred_batch_norm (bool):
whether to use deferred BatchNorm moving statistics (default:
:data:`False`, see :
ref
:`Deferred Batch Normalization` for more
:data:`False`, see :
class
:`Deferred Batch Normalization
<DeferredBatchNorm>
` for more
details)
Raises:
...
...
@@ -339,15 +339,13 @@ class Pipe(Module):
raise
MOVING_DENIED
def
to
(
self
,
*
args
:
Any
,
**
kwargs
:
Any
)
->
"Pipe"
:
# Deny these usages:
#
# - to(device[, dtype, non_blocking])
# - to(tensor[, non_blocking])
#
# But allow this:
#
# - to(dtype[, non_blocking])
#
""" Deny these usages:
- to(device[, dtype, non_blocking])
- to(tensor[, non_blocking])
But allow this:
- to(dtype[, non_blocking])"""
if
"device"
in
kwargs
or
"tensor"
in
kwargs
:
raise
MOVING_DENIED
...
...
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