import tensorflow as tf

                    b,name=name)
    def get_variables(self):
        return {'w':self.w,'b':self.b}

class DilatedConv3D(object) :
    def __init__(self,name,input_dim,output_dim,k_t=2,k_h=3,k_w=3,d_t=2,d_h=1,d_w=1,
                 stddev=0.02, data_format='NDHWC') :
        with tf.variable_scope(name) :
            assert(data_format == 'NDHWC')
            self.w = tf.get_variable('w', [k_t, k_h, k_w, input_dim, output_dim],
                                initializer=tf.truncated_normal_initializer(stddev=stddev))
            self.b = tf.get_variable('b',[output_dim], initializer=tf.constant_initializer(0.0))
            self.strides = [1,1,1]
            self.dilates = [d_t, d_h, d_w]
    def __call__(self,input_var,name=None) :
        k_t,k_h,k_w,_,_ = self.w.get_shape().as_list()
        _t = tf.pad(input_var, [[0,0],[0,0],[k_h//2,k_h//2],[k_w//2,k_w//2],[0,0]], "SYMMETRIC")
        return tf.nn.bias_add(
                    tf.nn.convolution(_t, self.w,
                                      strides=self.strides, dilation_rate=self.dilates,
                                      padding='VALID'),
                    self.b,name=name)
