__all__ = ["Pattern"]

from ..utils import isfunction

import lasagne.objectives
from lasagne.layers import get_all_layers
from lasagne.layers import InputLayer
from lasagne.layers import Layer

import theano.tensor as T

import numpy as np

import itertools
from collections import OrderedDict
import inspect

import copy
import os
import tarfile
from warnings import warn

class Pattern(object):
    """
    The :class:`Pattern` class represents a side information pattern and
    should be subclassed when implementing a new pattern.

    It is similar to :class:`lasagne.layers.Layer` and mimics some of 
    its functionality, but does not inherit from it.
    
    *How to implement your own pattern?*
    
    A minimal example should implement the following functions:

    - get_side_objective
    - default_target_objective
    - default_side_objective