AlexHJH/onnx_text

Invalid equals in deploy.onntxt

Closed this issue · 1 comments

@AlexHJH can you confirm the second = in the deploy.onntxt snippet below is valid?

    n441 = Constant<
        value = float = {3.}
        >()
single-attr-value ::= tensor-constant | graph | prim-constant
tensor-constant ::= tensor-type '{' prim-constants '}'
tensor-type ::= prim-type | prim-type '[' ']' | prim-type '[' tensor-dims ']'

@lutzroeder it is valid in onnx==1.11.0 ,

    n441 = Constant<
        value = float[]
        >()

    n441_1 = Constant<
        value = float = {1.0}
        >()
    
    n441_2 = Constant<
        value = float[1, 3] = {1.0, 2.0, 1e-7}
        >()
     
    # sub graph
    nsub_graph = SubGraph <
        sub_graph = gprah_item (float[1, 2] a) => (float[5] b)
        {
            b = Relu(a)
        }
        >()

alse these can be used

prim-type '[' ']'

like int32[] not declare dims,so canot be initialized