TrainingExtensions/torch/src/python/aimet_torch/meta/connectedgraph.py
def _update_op_output_with_product(op: Op, product: Product):
    """
    Update the output of an op with the given product if there is not already an associated product. Also reconcile
    shapes of the op and product if possible.
    :param op: Op to update output for
    :param product: Output product of the op
    """
    op.output = product
    if op.output_shape is None:
        # Possible for product's shape to be None here as well. If so, they will both remain None.
        op.output_shape = product.shape
    elif product.shape is None:
        product.shape = op.output_shape
    elif product.shape and op.output_shape != product.shape:
        logger.debug('Mismatch between existing shape %s for product %s and output shape %s for '
                     'output of op %s', product.shape, product.name, op.output_shape,
                     op.name)

    Update the output of an op with the given product if there is not already an associated product. Also reconcile
    shapes of the op and product if possible.
    :param op: Op to update output for
    :param product: Output product of the op
    
Update the output of an op with the given product if there is not already an associated product. Also reconcile
shapes of the op and product if possible.
Update the output of an op with the given product if there is not already an associated product . Also reconcile shapes of the op and product if possible .
def _update_op_output_with_product(op: Op, product: Product):
    op.output = product
    if op.output_shape is None:
        op.output_shape = product.shape
    elif product.shape is None:
        product.shape = op.output_shape
    elif product.shape and op.output_shape != product.shape:
        logger.debug('Mismatch between existing shape %s for product %s and output shape %s for '
                     'output of op %s', product.shape, product.name, op.output_shape,
                     op.name)
def _update_op_output_with_product ( op : Op , product : Product ) : op . output = product if op . output_shape is None : op . output_shape = product . shape elif product . shape is None : product . shape = op . output_shape elif product . shape and op . output_shape != product . shape : logger . debug ( 'Mismatch between existing shape %s for product %s and output shape %s for ' 'output of op %s' , product . shape , product . name , op . output_shape , op . name )
Update the output of an op with the given product if there is not already an associated product.
Update the output of an op with the given product if there is not already an associated product .
"""
    Update the output of an op with the given product if there is not already an associated product. Also reconcile
    shapes of the op and product if possible.
    :param op: Op to update output for
    :param product: Output product of the op
    """ # Possible for product's shape to be None here as well. If so, they will both remain None.
op
Op
Op to update output for
Op to update output for
product
Product
Output product of the op
Output product of the op