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
641fdd9f
Unverified
Commit
641fdd9f
authored
Aug 09, 2023
by
Philip Meier
Committed by
GitHub
Aug 09, 2023
Browse files
remove custom types defintions from datapoints module (#7814)
parent
6b020798
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
torchvision/transforms/v2/functional/_utils.py
torchvision/transforms/v2/functional/_utils.py
+4
-1
No files found.
torchvision/transforms/v2/functional/_utils.py
View file @
641fdd9f
import
functools
import
functools
import
warnings
import
warnings
from
typing
import
Any
,
Callable
,
Dict
,
Type
from
typing
import
Any
,
Callable
,
Dict
,
List
,
Optional
,
Sequence
,
Type
,
Union
import
torch
import
torch
from
torchvision
import
datapoints
from
torchvision
import
datapoints
_FillType
=
Union
[
int
,
float
,
Sequence
[
int
],
Sequence
[
float
],
None
]
_FillTypeJIT
=
Optional
[
List
[
float
]]
def
is_simple_tensor
(
inpt
:
Any
)
->
bool
:
def
is_simple_tensor
(
inpt
:
Any
)
->
bool
:
return
isinstance
(
inpt
,
torch
.
Tensor
)
and
not
isinstance
(
inpt
,
datapoints
.
Datapoint
)
return
isinstance
(
inpt
,
torch
.
Tensor
)
and
not
isinstance
(
inpt
,
datapoints
.
Datapoint
)
...
...
Prev
1
2
Next
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