Skip to content

Minor docstring error in TensorInputType  #2056

@alealv

Description

@alealv

The Docstring says:

    (2) string:
        Verify different input parameters binding with the same `type_domain` are the same data type.
        This additional check is done by defining a `type_domains` dictionary in the Operation class
        For example:

        ```
        class conv(Operation):
            input_spec = InputSpec(
                x=TensorInputType(type_domain="T"),
                weight=TensorInputType(type_domain="U"),
            )

            type_domains = {
                "T": (types.fp16, types.fp32),
            }
        ```
        would verify:
        (i) `x` and `weight` are one of the float16 or float32 type.
        (ii) `x` and `weight` are the same type.

But I think should be changed to:

@@ -251,7 +251,7 @@ class TensorInputType(_InputType):
         class conv(Operation):
             input_spec = InputSpec(
                 x=TensorInputType(type_domain="T"),
-                weight=TensorInputType(type_domain="U"),
+                weight=TensorInputType(type_domain="T"),
             )

             type_domains = {

Metadata

Metadata

Assignees

Labels

bugUnexpected behaviour that should be corrected (type)triagedReviewed and examined, release as been assigned if applicable (status)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions