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
07316481
Commit
07316481
authored
Dec 01, 2015
by
lucasb-eyer
Browse files
Fix unary dimension in README, see #2.
parent
a6789c6d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
README.md
README.md
+2
-2
No files found.
README.md
View file @
07316481
...
@@ -53,9 +53,9 @@ You can then set a fixed unary potential in the following way:
...
@@ -53,9 +53,9 @@ You can then set a fixed unary potential in the following way:
```
python
```
python
U
=
np
.
array
(...)
# Get the unary in some way.
U
=
np
.
array
(...)
# Get the unary in some way.
print
(
U
.
shape
)
# -> (640, 480
, 5
)
print
(
U
.
shape
)
# -> (
5,
640, 480)
print
(
U
.
dtype
)
# -> dtype('float32')
print
(
U
.
dtype
)
# -> dtype('float32')
U
=
U
.
reshape
((
-
1
,
5
))
# Needs to be flat.
U
=
U
.
reshape
((
5
,
-
1
))
# Needs to be flat.
d
.
setUnaryEnergy
(
U
)
d
.
setUnaryEnergy
(
U
)
# Or alternatively: d.setUnary(ConstUnary(U))
# Or alternatively: d.setUnary(ConstUnary(U))
...
...
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