Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
f9ba2e38
Commit
f9ba2e38
authored
Sep 25, 2015
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renamed some things for consistency.
parent
e74c221b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
24 deletions
+24
-24
core.h
dlib/dnn/core.h
+17
-17
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
...
@@ -207,12 +207,12 @@ namespace dlib
template
<
typename
input_iterator
>
template
<
typename
input_iterator
>
void
to_tensor
(
void
to_tensor
(
input_iterator
begin
,
input_iterator
i
begin
,
input_iterator
end
,
input_iterator
i
end
,
resizable_tensor
&
data
resizable_tensor
&
data
)
const
)
const
{
{
sub_network
.
to_tensor
(
begin
,
end
,
data
);
sub_network
.
to_tensor
(
ibegin
,
i
end
,
data
);
}
}
template
<
typename
input_iterator
>
template
<
typename
input_iterator
>
...
@@ -392,14 +392,14 @@ namespace dlib
...
@@ -392,14 +392,14 @@ namespace dlib
template
<
typename
input_iterator
>
template
<
typename
input_iterator
>
void
to_tensor
(
void
to_tensor
(
input_iterator
begin
,
input_iterator
i
begin
,
input_iterator
end
,
input_iterator
i
end
,
resizable_tensor
&
data
resizable_tensor
&
data
)
const
)
const
{
{
input_layer
.
to_tensor
(
begin
,
end
,
data
);
input_layer
.
to_tensor
(
ibegin
,
i
end
,
data
);
// make sure the input layer's to_tensor() function is implemented properly.
// 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
(
ibegin
,
i
end
)
*
sample_expansion_factor
==
data
.
num_samples
(),
""
);
data
.
async_copy_to_device
();
data
.
async_copy_to_device
();
}
}
...
@@ -575,12 +575,12 @@ namespace dlib
...
@@ -575,12 +575,12 @@ namespace dlib
template
<
typename
input_iterator
>
template
<
typename
input_iterator
>
void
to_tensor
(
void
to_tensor
(
input_iterator
begin
,
input_iterator
i
begin
,
input_iterator
end
,
input_iterator
i
end
,
resizable_tensor
&
data
resizable_tensor
&
data
)
const
)
const
{
{
sub_network
.
to_tensor
(
begin
,
end
,
data
);
sub_network
.
to_tensor
(
ibegin
,
i
end
,
data
);
}
}
template
<
typename
input_iterator
>
template
<
typename
input_iterator
>
...
@@ -665,17 +665,17 @@ namespace dlib
...
@@ -665,17 +665,17 @@ namespace dlib
template
<
typename
input_iterator
>
template
<
typename
input_iterator
>
void
to_tensor
(
void
to_tensor
(
input_iterator
begin
,
input_iterator
i
begin
,
input_iterator
end
,
input_iterator
i
end
,
resizable_tensor
&
data
resizable_tensor
&
data
)
const
)
const
{
{
input_layer
.
to_tensor
(
begin
,
end
,
data
);
input_layer
.
to_tensor
(
ibegin
,
i
end
,
data
);
}
}
template
<
typename
input_iterator
>
template
<
typename
input_iterator
>
const
tensor
&
operator
()
(
const
tensor
&
operator
()
(
input_iterator
ibegin
,
// TODO, make naming uniform for input iterators
input_iterator
ibegin
,
input_iterator
iend
input_iterator
iend
)
)
{
{
...
@@ -1085,12 +1085,12 @@ namespace dlib
...
@@ -1085,12 +1085,12 @@ namespace dlib
template
<
typename
input_iterator
>
template
<
typename
input_iterator
>
void
to_tensor
(
void
to_tensor
(
input_iterator
begin
,
input_iterator
i
begin
,
input_iterator
end
,
input_iterator
i
end
,
resizable_tensor
&
data
resizable_tensor
&
data
)
const
)
const
{
{
sub_network
.
to_tensor
(
begin
,
end
,
data
);
sub_network
.
to_tensor
(
ibegin
,
i
end
,
data
);
}
}
template
<
typename
input_iterator
>
template
<
typename
input_iterator
>
...
...
dlib/dnn/core_abstract.h
View file @
f9ba2e38
...
@@ -199,19 +199,19 @@ namespace dlib
...
@@ -199,19 +199,19 @@ namespace dlib
template
<
typename
input_iterator
>
template
<
typename
input_iterator
>
void
to_tensor
(
void
to_tensor
(
input_iterator
begin
,
input_iterator
i
begin
,
input_iterator
end
,
input_iterator
i
end
,
resizable_tensor
&
data
resizable_tensor
&
data
)
const
;
)
const
;
/*!
/*!
requires
requires
- [
begin,
end) is an iterator range over input_type objects.
- [
ibegin, i
end) is an iterator range over input_type objects.
ensures
ensures
- Converts the iterator range into a tensor and stores it into #data.
- 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(
ibegin,i
end)*sample_expansion_factor.
- Invokes data.async_copy_to_device() so that the data begins transferring
- Invokes data.async_copy_to_device() so that the data begins transferring
to the device.
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(
ibegin,i
end,data).
!*/
!*/
template
<
typename
input_iterator
>
template
<
typename
input_iterator
>
...
@@ -338,8 +338,8 @@ namespace dlib
...
@@ -338,8 +338,8 @@ namespace dlib
{
{
/*!
/*!
REQUIREMENTS ON LOSS_DETAILS
REQUIREMENTS ON LOSS_DETAILS
- Must be a type that implements the EXAMPLE_L
AYER_ interface defined in
- Must be a type that implements the EXAMPLE_L
OSS_LAYER_ interface defined
layer
s_abstract.h
in los
s_abstract.h
- LOSS_DETAILS::sample_expansion_factor == SUB_NET::sample_expansion_factor
- 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.
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