Browse Source

remove shape validator for merge

tags/v0.3.0-alpha
jiangjinsheng 5 years ago
parent
commit
60e78f3f57
1 changed files with 0 additions and 8 deletions
  1. +0
    -8
      mindspore/ops/operations/control_ops.py

+ 0
- 8
mindspore/ops/operations/control_ops.py View File

@@ -154,14 +154,6 @@ class Merge(PrimitiveWithInfer):
raise NotImplementedError raise NotImplementedError


def infer_shape(self, inputs): def infer_shape(self, inputs):
validator.check_integer('inputs len', len(inputs), 0, Rel.GT, self.name)
input_0 = inputs[0]

for i in range(1, len(inputs)):
if inputs[i] != input_0:
raise ValueError(f"For \'{self.name}\', the shape of {i}th input should be same as "
f"first input {input_0}, but got {inputs[i]}.")

return (inputs[0], [1]) return (inputs[0], [1])


def infer_dtype(self, inputs): def infer_dtype(self, inputs):


Loading…
Cancel
Save