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
f9ba2e38
Commit
f9ba2e38
authored
Sep 25, 2015
by
Davis King
Browse files
Renamed some things for consistency.
parent
e74c221b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
24 deletions
+24
-24
dlib/dnn/core.h
dlib/dnn/core.h
+17
-17
dlib/dnn/core_abstract.h
dlib/dnn/core_abstract.h
+7
-7
No files found.
dlib/dnn/core.h
View file @
f9ba2e38
...
...
@@ -207,12 +207,12 @@ namespace dlib
template
<
typename
input_iterator
>
void
to_tensor
(
input_iterator
begin
,
input_iterator
end
,
input_iterator
i
begin
,
input_iterator
i
end
,
resizable_tensor
&
data
)
const
{
sub_network
.
to_tensor
(
begin
,
end
,
data
);
sub_network
.
to_tensor
(
i
begin
,
i
end
,
data
);
}
template
<
typename
input_iterator
>
...
...
@@ -392,14 +392,14 @@ namespace dlib
template
<
typename
input_iterator
>
void
to_tensor
(
input_iterator
begin
,
input_iterator
end
,
input_iterator
i
begin
,
input_iterator
i
end
,
resizable_tensor
&
data
)
const
{
input_layer
.
to_tensor
(
begin
,
end
,
data
);
input_layer
.
to_tensor
(
i
begin
,
i
end
,
data
);
// make sure the input layer's to_tensor() function is implemented properly.
DLIB_CASSERT
(
std
::
distance
(
begin
,
end
)
*
sample_expansion_factor
==
data
.
num_samples
(),
""
);
DLIB_CASSERT
(
std
::
distance
(
i
begin
,
i
end
)
*
sample_expansion_factor
==
data
.
num_samples
(),
""
);
data
.
async_copy_to_device
();
}
...
...
@@ -575,12 +575,12 @@ namespace dlib
template
<
typename
input_iterator
>
void
to_tensor
(
input_iterator
begin
,
input_iterator
end
,
input_iterator
i
begin
,
input_iterator
i
end
,
resizable_tensor
&
data
)
const
{
sub_network
.
to_tensor
(
begin
,
end
,
data
);
sub_network
.
to_tensor
(
i
begin
,
i
end
,
data
);
}
template
<
typename
input_iterator
>
...
...
@@ -665,17 +665,17 @@ namespace dlib
template
<
typename
input_iterator
>
void
to_tensor
(
input_iterator
begin
,
input_iterator
end
,
input_iterator
i
begin
,
input_iterator
i
end
,
resizable_tensor
&
data
)
const
{
input_layer
.
to_tensor
(
begin
,
end
,
data
);
input_layer
.
to_tensor
(
i
begin
,
i
end
,
data
);
}
template
<
typename
input_iterator
>
const
tensor
&
operator
()
(
input_iterator
ibegin
,
// TODO, make naming uniform for input iterators
input_iterator
ibegin
,
input_iterator
iend
)
{
...
...
@@ -1085,12 +1085,12 @@ namespace dlib
template
<
typename
input_iterator
>
void
to_tensor
(
input_iterator
begin
,
input_iterator
end
,
input_iterator
i
begin
,
input_iterator
i
end
,
resizable_tensor
&
data
)
const
{
sub_network
.
to_tensor
(
begin
,
end
,
data
);
sub_network
.
to_tensor
(
i
begin
,
i
end
,
data
);
}
template
<
typename
input_iterator
>
...
...
dlib/dnn/core_abstract.h
View file @
f9ba2e38
...
...
@@ -199,19 +199,19 @@ namespace dlib
template
<
typename
input_iterator
>
void
to_tensor
(
input_iterator
begin
,
input_iterator
end
,
input_iterator
i
begin
,
input_iterator
i
end
,
resizable_tensor
&
data
)
const
;
/*!
requires
- [begin, end) is an iterator range over input_type objects.
- [
i
begin,
i
end) is an iterator range over input_type objects.
ensures
- Converts the iterator range into a tensor and stores it into #data.
- #data.num_samples() == distance(begin,end)*sample_expansion_factor.
- #data.num_samples() == distance(
i
begin,
i
end)*sample_expansion_factor.
- Invokes data.async_copy_to_device() so that the data begins transferring
to the device.
- Ultimately this function just calls sub_net().sub_net()...sub_net().to_tensor(begin,end,data).
- Ultimately this function just calls sub_net().sub_net()...sub_net().to_tensor(
i
begin,
i
end,data).
!*/
template
<
typename
input_iterator
>
...
...
@@ -338,8 +338,8 @@ namespace dlib
{
/*!
REQUIREMENTS ON LOSS_DETAILS
- Must be a type that implements the EXAMPLE_LAYER_ interface defined
in
layer
s_abstract.h
- Must be a type that implements the EXAMPLE_
LOSS_
LAYER_ interface defined
in los
s_abstract.h
- LOSS_DETAILS::sample_expansion_factor == SUB_NET::sample_expansion_factor
i.e. The loss layer and input layer must agree on the sample_expansion_factor.
...
...
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