def __init__(self, Para): Linear.__init__(self, Para) try: self.outChannel = self.hPara['outChannel'] self.bias = self.hPara['bias'] except: self.printError( "FullyConnected parameters does not exit or not complete.")
def __init__(self, Para): Linear.__init__(self, Para) try: self.padding = Para['padding'] if self.padding: self.padShape = Para[ 'padShape'] # 2D tuple (pH,pW) padding on each side else: self.padShape = (0, 0) self.outChannel = Para['outChannel'] self.kernelShape = Para[ 'kernelShape'] # should be a 2D tuple (kH,kW) self.stride = Para['stride'] # same for height and width dimension self.bias = Para['bias'] except: self.printError("Conv2D parameters does not exit or not complete.")