(shape, name)
return shape
检验shape长度，超过4则截断
检验shape长度，超过4则截断
检验shape长度，超过4则截断
def validateShape(shape, name):
    """检验shape长度，超过4则截断"""
    if len(shape) > 4:
        newShape = shape[-4:]
        print('\033[31m ' + name + ' tensor shape length > 4, 处理为丢弃头部shape \033[0m')
        return newShape
    return shape
def validateShape ( shape , name ) : if len ( shape ) > 4 : newShape = shape [ - 4 : ] print ( '\033[31m ' + name + ' tensor shape length > 4, 处理为丢弃头部shape \033[0m') return newShape return shape