import tensorflow as tf

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

class WeightNormSymPadConv2d(object): #Resize and Convolution(upsacle by 2)
    def __init__(self,name,input_dim,output_dim,
                 k_h=3,k_w=3,stddev=0.02) :
        assert k_h%2==1 and k_w%2==1, 'kernel size should be odd numbers to ensure exact size'
        with tf.variable_scope(name) :
            self.conv2d = WeightNormConv2d('conv',input_dim,output_dim,k_h,k_w,1,1,data_format='NHWC',padding='VALID')
        self.padding = [ [0,0],[k_h//2,k_h//2],[k_w//2,k_w//2],[0,0] ]

    def __call__(self,input_var,name=None,**kwargs):
        _,h,w,c = input_var.shape.as_list()
        _t = tf.image.resize_nearest_neighbor(input_var, [h*2, w*2])
        _t = tf.pad(_t,self.padding, mode='SYMMETRIC')
