forked from mindspore-Ecosystem/mindspore
Remove redundant check about IsInstance op
This commit is contained in:
parent
edd8214459
commit
195d97ad46
|
@ -347,8 +347,6 @@ class IsInstance(PrimitiveWithInfer):
|
||||||
sub_type_t = inst['dtype']
|
sub_type_t = inst['dtype']
|
||||||
type_v = type_['value']
|
type_v = type_['value']
|
||||||
|
|
||||||
if not isinstance(inst, type(mstype.tensor)):
|
|
||||||
validator.check_const_input("inst", inst['value'], self.name)
|
|
||||||
validator.check_value_type("type_", type_v, [mstype.Type], self.name)
|
validator.check_value_type("type_", type_v, [mstype.Type], self.name)
|
||||||
|
|
||||||
if type_v == mstype.list_:
|
if type_v == mstype.list_:
|
||||||
|
|
|
@ -114,11 +114,6 @@ raise_set = [
|
||||||
'desc_inputs': [mstype.number, None],
|
'desc_inputs': [mstype.number, None],
|
||||||
'skip': ['backward']}),
|
'skip': ['backward']}),
|
||||||
|
|
||||||
# inst is var
|
|
||||||
('IsInstance0', {
|
|
||||||
'block': (P.IsInstance(), {'exception': ValueError, 'error_keywords': ['IsInstance']}),
|
|
||||||
'desc_inputs': [5.0, mstype.number],
|
|
||||||
'skip': ['backward']}),
|
|
||||||
# t is not mstype.Type
|
# t is not mstype.Type
|
||||||
('IsInstance1', {
|
('IsInstance1', {
|
||||||
'block': (IsInstanceNet(5.0), {'exception': TypeError, 'error_keywords': ['IsInstance']}),
|
'block': (IsInstanceNet(5.0), {'exception': TypeError, 'error_keywords': ['IsInstance']}),
|
||||||
|
|
Loading…
Reference in New Issue