• Ted Themistokleous's avatar
    Fix parse_if cases for output result of if · 7bc8dd35
    Ted Themistokleous authored
    The onnx spec mentions that the output shape of the resulting then/else branches must share the same type, but not the same shape. The only requirement is that the first dimension is compatible should one of the inputs have rank of one.
    
    Without this we prematurely assert when an if is requred on the following case
    
    int64, {1234, 1} (this is a 1 rank tensor)
    int64, {1234}  (this result is scalar)
    7bc8dd35
parse_if.cpp 4.82 KB