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
pydensecrf
Commits
b5e13a9a
Commit
b5e13a9a
authored
Apr 25, 2017
by
lucasb-eyer
Browse files
Fix assertion of pairwise potential shape, thx @Pandoro.
parent
c15c0e55
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
pydensecrf/densecrf.pyx
pydensecrf/densecrf.pyx
+2
-2
No files found.
pydensecrf/densecrf.pyx
View file @
b5e13a9a
...
...
@@ -69,8 +69,8 @@ cdef class DenseCRF:
del
self
.
_this
def
addPairwiseEnergy
(
self
,
float
[:,::
1
]
features
not
None
,
compat
,
KernelType
kernel
=
DIAG_KERNEL
,
NormalizationType
normalization
=
NORMALIZE_SYMMETRIC
):
if
features
.
shape
[
0
]
!=
self
.
_nlabel
or
features
.
shape
[
1
]
!=
self
.
_nvar
:
raise
ValueError
(
"Bad shape for pairwise energy (Need {}, got {})"
.
format
(
(
self
.
_nlabel
,
self
.
_nvar
)
,
(
features
.
shape
[
0
],
features
.
shape
[
1
])))
if
features
.
shape
[
1
]
!=
self
.
_nvar
:
raise
ValueError
(
"Bad shape for pairwise energy (Need
(?,
{}
)
, got {})"
.
format
(
self
.
_nvar
,
(
features
.
shape
[
0
],
features
.
shape
[
1
])))
self
.
_this
.
addPairwiseEnergy
(
eigen
.
c_matrixXf
(
features
),
_labelcomp
(
compat
),
kernel
,
normalization
)
...
...
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