Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
210130133
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Summer2021
210130133
Commits
88c0687c
Commit
88c0687c
authored
5 years ago
by
lixinqi
Browse files
Options
Downloads
Patches
Plain Diff
fix batch_axis bugs in ConvFilterGradOp and DecodeOFRecordOp
parent
fc5b13bf
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
oneflow/core/operator/conv_filter_grad_op.cpp
+1
-1
1 addition, 1 deletion
oneflow/core/operator/conv_filter_grad_op.cpp
oneflow/core/operator/decode_ofrecord_op.cpp
+4
-1
4 additions, 1 deletion
oneflow/core/operator/decode_ofrecord_op.cpp
with
5 additions
and
2 deletions
oneflow/core/operator/conv_filter_grad_op.cpp
+
1
−
1
View file @
88c0687c
...
...
@@ -93,7 +93,7 @@ void ConvFilterGradOp::VirtualGenKernelConf(
Maybe
<
void
>
ConvFilterGradOp
::
InferBatchAxis
(
std
::
function
<
OptInt64
*
(
const
std
::
string
&
)
>
BatchAxis4BnInOp
)
const
{
CHECK_OR_RETURN
(
*
BatchAxis4BnInOp
(
"dy"
)
==
*
BatchAxis4BnInOp
(
"x"
));
*
BatchAxis4BnInOp
(
"filter_diff"
)
=
*
BatchAxis4BnInOp
(
"x"
);
BatchAxis4BnInOp
(
"filter_diff"
)
->
clear_value
(
);
return
Maybe
<
void
>::
Ok
();
}
...
...
This diff is collapsed.
Click to expand it.
oneflow/core/operator/decode_ofrecord_op.cpp
+
4
−
1
View file @
88c0687c
...
...
@@ -76,7 +76,10 @@ LogicalBlobId DecodeOFRecordOp::obn2lbi(const std::string& output_bn) const {
Maybe
<
void
>
DecodeOFRecordOp
::
InferBatchAxis
(
std
::
function
<
OptInt64
*
(
const
std
::
string
&
)
>
BatchAxis4BnInOp
)
const
{
if
(
op_conf
().
decode_ofrecord_conf
().
has_in
())
{
CHECK_OR_RETURN
(
BatchAxis4BnInOp
(
SoleIbn
()));
}
if
(
op_conf
().
decode_ofrecord_conf
().
has_in
())
{
CHECK_OR_RETURN
(
BatchAxis4BnInOp
(
SoleIbn
())
->
has_value
());
CHECK_EQ_OR_RETURN
(
BatchAxis4BnInOp
(
SoleIbn
())
->
value
(),
0
);
}
for
(
const
auto
&
obn
:
output_bns
())
{
BatchAxis4BnInOp
(
obn
)
->
set_value
(
0
);
}
return
Maybe
<
void
>::
Ok
();
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment