-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Conversation
|
||
class EmptyLayerError(SpeedupError): | ||
def __init__(self): | ||
super(EmptyLayerError, self).__init__("Pruning a Layer to empty is not legal") |
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.
In this situation, should we suggest the user add this layer in exclude
?
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.
Not exactly the same, there may be two reasons that a layer is pruned to empty: (1) it's sparsity ratio equals to 1.0 (2) it's output is useless after the mask propagation.
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.
got it
|
||
class ShapeMisMatchError(SpeedupError): | ||
def __init__(self): | ||
super(ShapeMisMatchError, self).__init__("Shape mismatch!") |
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.
maybe we can also add layer name in the error message for debugging?
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.
Good suggestion, but I cannot get the op_name
in the module replace functions under current interfaces. To keep the replacement function interface clean, I suggest to just report the error type now.
Add Error code for speedup module.