-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Conversation
src/operator/slice_channel-inl.h
Outdated
@@ -176,16 +177,22 @@ class SliceChannelProp : public OperatorProperty { | |||
bool InferType(std::vector<int> *in_type, | |||
std::vector<int> *out_type, | |||
std::vector<int> *aux_type) const override { | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is to be removed, why is it commented? Or is this temporary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, it should have been removed. Good catch, fixed.
data2._set_attr(__dtype__="-1") | ||
concat_res = mx.sym.concat(data, data2) | ||
out = mx.sym.split(concat_res, axis=1, num_outputs=2) | ||
final_res = amp.convert_symbol(out) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any checks or assertions needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, this was earlier failing in the convert_symbol call before this change. Just need to check if convert_symbol completes successfully.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor questions.. Also address CI failures..
d995250
to
86221d0
Compare
I don't know enough to comment on the changes to the example etc., but the main fix from this PR (InferType in SliceChannel) looks good. @anirudh2290 Searching for |
@ptrendx how did you come up with that sentence ? EDIT: Never mind, its the same error message. |
@ptrendx good point about the other places where error is raised. The scope of the PR increased :) . Can we start with this PR first and I will follow up with another PR/PRs for fixes in other ops. Sorry, little busy with other deliverables too and cannot do it immediately. For the examples, I have tested running the gluon models for conversion and dummy inference in a loop. |
Sure, having this PR fix just SliceChannel is totally fine. |
* Refactor elemwise_op_common and change SliceChannel InferType * Add gluoncv models * Comment Faster RCNN models
Description
Fix SliceChannel Type Inference. Do forward and backward inference for slice channel with ElemwiseAttr logic. Remove exception thrown from infer_type logic in slice channel.
Adds some gluoncv models to AMP examples.
@ptrendx
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Changes
Comments