Commit f9ba2e38 authored by Davis King's avatar Davis King

Renamed some things for consistency.

parent e74c221b
...@@ -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 ibegin,
input_iterator end, input_iterator iend,
resizable_tensor& data resizable_tensor& data
) const ) const
{ {
sub_network.to_tensor(begin,end,data); sub_network.to_tensor(ibegin,iend,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 ibegin,
input_iterator end, input_iterator iend,
resizable_tensor& data resizable_tensor& data
) const ) const
{ {
input_layer.to_tensor(begin, end, data); input_layer.to_tensor(ibegin, iend, 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,iend)*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 ibegin,
input_iterator end, input_iterator iend,
resizable_tensor& data resizable_tensor& data
) const ) const
{ {
sub_network.to_tensor(begin,end,data); sub_network.to_tensor(ibegin,iend,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 ibegin,
input_iterator end, input_iterator iend,
resizable_tensor& data resizable_tensor& data
) const ) const
{ {
input_layer.to_tensor(begin,end,data); input_layer.to_tensor(ibegin,iend,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 ibegin,
input_iterator end, input_iterator iend,
resizable_tensor& data resizable_tensor& data
) const ) const
{ {
sub_network.to_tensor(begin,end,data); sub_network.to_tensor(ibegin,iend,data);
} }
template <typename input_iterator> template <typename input_iterator>
......
...@@ -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 ibegin,
input_iterator end, input_iterator iend,
resizable_tensor& data resizable_tensor& data
) const; ) const;
/*! /*!
requires requires
- [begin, end) is an iterator range over input_type objects. - [ibegin, iend) 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,iend)*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,iend,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_LAYER_ interface defined in - Must be a type that implements the EXAMPLE_LOSS_LAYER_ interface defined
layers_abstract.h in loss_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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment