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
269a3ed1
"src/git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "9f4d997d8ffabe455c4f743139d3b5d5039339da"
Commit
269a3ed1
authored
Apr 13, 2021
by
Davis King
Browse files
fix incorrect docs about what gradient is computed
parent
92106718
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
dlib/cuda/tensor_tools.h
dlib/cuda/tensor_tools.h
+9
-8
No files found.
dlib/cuda/tensor_tools.h
View file @
269a3ed1
...
@@ -1639,18 +1639,19 @@ namespace dlib { namespace tt
...
@@ -1639,18 +1639,19 @@ namespace dlib { namespace tt
void
gelu_gradient
(
void
gelu_gradient
(
tensor
&
grad
,
tensor
&
grad
,
const
tensor
&
dest
,
const
tensor
&
src
,
const
tensor
&
gradient_input
const
tensor
&
gradient_input
);
);
/*!
/*!
requires
requires
- have_same_dimensions(dest,gradient_input) == true
- have_same_dimensions(src,gradient_input) == true
- have_same_dimensions(dest,grad) == true
- have_same_dimensions(src,grad) == true
ensures
ensures
- This function computes the gradient of f() with respect to SRC and stores
- Recalling that dest is the output of gelu(dest,src), let f(src) ==
it to grad. Moreover, if is_same_object(grad,gradient_input)==true then
dot(gradient_input,dest). Then this function computes the gradient of f() with respect
the output is assigned to grad, replacing its previous contents.
to src and stores it to grad. Moreover, if is_same_object(grad,gradient_input)==true
Otherwise the output is added to grad.
then the output is assigned to grad, replacing its previous contents. Otherwise the
output is added to grad.
- This function supports in-place operation, i.e. having
- This function supports in-place operation, i.e. having
is_same_object(grad, gradient_input)==true
is_same_object(grad, gradient_input)==true
!*/
!*/
...
...
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