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
0f180a68
"vscode:/vscode.git/clone" did not exist on "3ebd6a83fcfbdecf3ccbae13ebaf4435c853465d"
Commit
0f180a68
authored
Apr 27, 2016
by
Davis King
Browse files
Fixed bad random number generation in layer initialization.
parent
a22d4559
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
dlib/dnn/layers.h
dlib/dnn/layers.h
+2
-2
No files found.
dlib/dnn/layers.h
View file @
0f180a68
...
...
@@ -80,7 +80,7 @@ namespace dlib
// allocate params for the filters and also for the filter bias values.
params
.
set_size
(
num_inputs
*
_num_filters
+
_num_filters
);
dlib
::
rand
rnd
(
"con_"
+
cast_to_string
(
num_outputs
+
num_inputs
));
dlib
::
rand
rnd
(
std
::
rand
(
));
randomize_parameters
(
params
,
num_inputs
+
num_outputs
,
rnd
);
filters
=
alias_tensor
(
_num_filters
,
sub
.
get_output
().
k
(),
_nr
,
_nc
);
...
...
@@ -663,7 +663,7 @@ namespace dlib
else
params
.
set_size
(
num_inputs
,
num_outputs
);
dlib
::
rand
rnd
(
"fc_"
+
cast_to_string
(
num_outputs
));
dlib
::
rand
rnd
(
std
::
rand
(
));
randomize_parameters
(
params
,
num_inputs
+
num_outputs
,
rnd
);
weights
=
alias_tensor
(
num_inputs
,
num_outputs
);
...
...
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