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
dlib
Commits
77e6255f
Unverified
Commit
77e6255f
authored
Sep 08, 2020
by
Adrià Arrufat
Committed by
GitHub
Sep 08, 2020
Browse files
Add error message for mismatched tensor sizes in dnn_trainer (#2165)
parent
40c3e488
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
dlib/dnn/trainer.h
dlib/dnn/trainer.h
+5
-0
No files found.
dlib/dnn/trainer.h
View file @
77e6255f
...
...
@@ -764,7 +764,12 @@ namespace dlib
{
std
::
vector
<
tensor
*>
temp
(
all_tensors
.
size
());
for
(
size_t
j
=
0
;
j
<
all_tensors
.
size
();
++
j
)
{
temp
[
j
]
=
all_tensors
[
j
][
i
];
DLIB_CASSERT
(
temp
[
0
]
->
size
()
==
temp
[
j
]
->
size
(),
"Make sure you don't modify the network structure "
"or number of parameters after constructing the trainer."
);
}
// ignore layers that don't have parameters
if
(
temp
[
0
]
->
size
()
!=
0
)
averagers
[
i
].
set
(
temp
);
...
...
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