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
f93ee49c
"examples/git@developer.sourcefind.cn:OpenDAS/dgl.git" did not exist on "bcf9923b32dacd8b1f06b156855b49b268b70dcc"
Commit
f93ee49c
authored
Oct 28, 2017
by
Davis King
Browse files
Made requires clause a little more sensible.
parent
12bc559d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
8 deletions
+14
-8
dlib/dnn/layers.h
dlib/dnn/layers.h
+12
-6
dlib/dnn/layers_abstract.h
dlib/dnn/layers_abstract.h
+2
-2
No files found.
dlib/dnn/layers.h
View file @
f93ee49c
...
@@ -75,9 +75,12 @@ namespace dlib
...
@@ -75,9 +75,12 @@ namespace dlib
void
set_num_filters
(
long
num
)
void
set_num_filters
(
long
num
)
{
{
DLIB_CASSERT
(
num
>
0
);
DLIB_CASSERT
(
num
>
0
);
DLIB_CASSERT
(
get_layer_params
().
size
()
==
0
,
if
(
num
!=
num_filters_
)
"You can't change the number of filters in con_ if the parameter tensor has already been allocated."
);
{
num_filters_
=
num
;
DLIB_CASSERT
(
get_layer_params
().
size
()
==
0
,
"You can't change the number of filters in con_ if the parameter tensor has already been allocated."
);
num_filters_
=
num
;
}
}
}
double
get_learning_rate_multiplier
()
const
{
return
learning_rate_multiplier
;
}
double
get_learning_rate_multiplier
()
const
{
return
learning_rate_multiplier
;
}
...
@@ -371,9 +374,12 @@ namespace dlib
...
@@ -371,9 +374,12 @@ namespace dlib
void
set_num_filters
(
long
num
)
void
set_num_filters
(
long
num
)
{
{
DLIB_CASSERT
(
num
>
0
);
DLIB_CASSERT
(
num
>
0
);
DLIB_CASSERT
(
get_layer_params
().
size
()
==
0
,
if
(
num
!=
num_filters_
)
"You can't change the number of filters in cont_ if the parameter tensor has already been allocated."
);
{
num_filters_
=
num
;
DLIB_CASSERT
(
get_layer_params
().
size
()
==
0
,
"You can't change the number of filters in cont_ if the parameter tensor has already been allocated."
);
num_filters_
=
num
;
}
}
}
double
get_learning_rate_multiplier
()
const
{
return
learning_rate_multiplier
;
}
double
get_learning_rate_multiplier
()
const
{
return
learning_rate_multiplier
;
}
...
...
dlib/dnn/layers_abstract.h
View file @
f93ee49c
...
@@ -730,7 +730,7 @@ namespace dlib
...
@@ -730,7 +730,7 @@ namespace dlib
/*!
/*!
requires
requires
- num > 0
- num > 0
- get_layer_params().size() == 0
- get_layer_params().size() == 0
|| num_filters() == num
(i.e. You can't change the number of filters in con_ if the parameter
(i.e. You can't change the number of filters in con_ if the parameter
tensor has already been allocated.)
tensor has already been allocated.)
ensures
ensures
...
@@ -974,7 +974,7 @@ namespace dlib
...
@@ -974,7 +974,7 @@ namespace dlib
/*!
/*!
requires
requires
- num > 0
- num > 0
- get_layer_params().size() == 0
- get_layer_params().size() == 0
|| num_filters() == num
(i.e. You can't change the number of filters in cont_ if the parameter
(i.e. You can't change the number of filters in cont_ if the parameter
tensor has already been allocated.)
tensor has already been allocated.)
ensures
ensures
...
...
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