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
f766d7ac
"src/git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "c81a88b239e2947f0aa8751a2e6d5bbaac1b2eec"
Unverified
Commit
f766d7ac
authored
May 03, 2024
by
Nicolas Hug
Committed by
GitHub
May 03, 2024
Browse files
Ignore some mypy errors (#8404)
parent
81343069
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
torchvision/datasets/cityscapes.py
torchvision/datasets/cityscapes.py
+1
-1
torchvision/prototype/utils/_internal.py
torchvision/prototype/utils/_internal.py
+1
-1
No files found.
torchvision/datasets/cityscapes.py
View file @
f766d7ac
...
@@ -188,7 +188,7 @@ class Cityscapes(VisionDataset):
...
@@ -188,7 +188,7 @@ class Cityscapes(VisionDataset):
if
t
==
"polygon"
:
if
t
==
"polygon"
:
target
=
self
.
_load_json
(
self
.
targets
[
index
][
i
])
target
=
self
.
_load_json
(
self
.
targets
[
index
][
i
])
else
:
else
:
target
=
Image
.
open
(
self
.
targets
[
index
][
i
])
target
=
Image
.
open
(
self
.
targets
[
index
][
i
])
# type: ignore[assignment]
targets
.
append
(
target
)
targets
.
append
(
target
)
...
...
torchvision/prototype/utils/_internal.py
View file @
f766d7ac
...
@@ -99,7 +99,7 @@ def fromfile(
...
@@ -99,7 +99,7 @@ def fromfile(
class
ReadOnlyTensorBuffer
:
class
ReadOnlyTensorBuffer
:
def
__init__
(
self
,
tensor
:
torch
.
Tensor
)
->
None
:
def
__init__
(
self
,
tensor
:
torch
.
Tensor
)
->
None
:
self
.
_memory
=
memoryview
(
tensor
.
numpy
())
self
.
_memory
=
memoryview
(
tensor
.
numpy
())
# type: ignore[arg-type]
self
.
_cursor
:
int
=
0
self
.
_cursor
:
int
=
0
def
tell
(
self
)
->
int
:
def
tell
(
self
)
->
int
:
...
...
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