Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tic
Overview
Overview
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
wenyuanbo
tic
Commits
63a3477a
Commit
63a3477a
authored
Mar 27, 2018
by
Pariksheet Pinjari
Committed by
Tianqi Chen
Mar 27, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update softmax.h (#1057)
parent
e15aae2b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
topi/include/topi/nn/softmax.h
+2
-2
No files found.
topi/include/topi/nn/softmax.h
View file @
63a3477a
...
@@ -83,7 +83,7 @@ inline Tensor softmax(const Tensor &x,
...
@@ -83,7 +83,7 @@ inline Tensor softmax(const Tensor &x,
});
});
return
tvm
::
compute
(
input_shape
,
[
&
](
const
Array
<
Var
>
&
indices
)
{
return
tvm
::
compute
(
input_shape
,
[
&
](
const
Array
<
Var
>
&
indices
)
{
return
_normalize
(
max_elem
,
expsum
,
indices
);
return
_normalize
(
max_elem
,
expsum
,
indices
);
});
}
,
name
,
tag
);
}
}
/*!
/*!
...
@@ -116,7 +116,7 @@ inline Tensor log_softmax(const Tensor& x,
...
@@ -116,7 +116,7 @@ inline Tensor log_softmax(const Tensor& x,
return
tvm
::
compute
(
return
tvm
::
compute
(
x
->
shape
,
[
&
](
Var
i
,
Var
j
)
{
x
->
shape
,
[
&
](
Var
i
,
Var
j
)
{
return
x
(
i
,
j
)
-
max_elem
(
i
)
-
tvm
::
log
(
expsum
(
i
));
return
x
(
i
,
j
)
-
max_elem
(
i
)
-
tvm
::
log
(
expsum
(
i
));
});
}
,
name
,
tag
);
}
}
}
// namespace nn
}
// namespace nn
...
...
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