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
c191b376
Commit
c191b376
authored
Jan 26, 2018
by
Davis King
Browse files
Made alias_tensor take a default offset of 0 so you can easily use it to
reshape a tensor.
parent
546bdf51
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
dlib/dnn/tensor.h
dlib/dnn/tensor.h
+2
-2
dlib/dnn/tensor_abstract.h
dlib/dnn/tensor_abstract.h
+2
-2
No files found.
dlib/dnn/tensor.h
View file @
c191b376
...
@@ -617,7 +617,7 @@ namespace dlib
...
@@ -617,7 +617,7 @@ namespace dlib
alias_tensor_instance
operator
()
(
alias_tensor_instance
operator
()
(
tensor
&
t
,
tensor
&
t
,
size_t
offset
size_t
offset
=
0
)
const
)
const
{
{
DLIB_CASSERT
(
offset
+
size
()
<=
t
.
size
(),
DLIB_CASSERT
(
offset
+
size
()
<=
t
.
size
(),
...
@@ -642,7 +642,7 @@ namespace dlib
...
@@ -642,7 +642,7 @@ namespace dlib
alias_tensor_const_instance
operator
()
(
alias_tensor_const_instance
operator
()
(
const
tensor
&
t
,
const
tensor
&
t
,
size_t
offset
size_t
offset
=
0
)
const
)
const
{
{
alias_tensor_const_instance
temp
;
alias_tensor_const_instance
temp
;
...
...
dlib/dnn/tensor_abstract.h
View file @
c191b376
...
@@ -680,7 +680,7 @@ namespace dlib
...
@@ -680,7 +680,7 @@ namespace dlib
alias_tensor_instance
operator
()
(
alias_tensor_instance
operator
()
(
tensor
&
t
,
tensor
&
t
,
size_t
offset
size_t
offset
=
0
)
const
;
)
const
;
/*!
/*!
requires
requires
...
@@ -701,7 +701,7 @@ namespace dlib
...
@@ -701,7 +701,7 @@ namespace dlib
alias_tensor_const_instance
operator
()
(
alias_tensor_const_instance
operator
()
(
const
tensor
&
t
,
const
tensor
&
t
,
size_t
offset
size_t
offset
=
0
)
const
;
)
const
;
/*!
/*!
requires
requires
...
...
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