def max_pooling_2d(data, size: tuple, step: tuple, reference=None): if reference is None: from paradox.neural_network.convolutional_neural_network.operator import MaxPooling2D return Symbol(operator=MaxPooling2D(size, step), inputs=as_symbols([data]), category=SymbolCategory.operator) else: from paradox.neural_network.convolutional_neural_network.operator import MaxReferencePooling2D return Symbol(operator=MaxReferencePooling2D(size, step), inputs=as_symbols([data, reference]), category=SymbolCategory.operator)
def max_pooling_nd(data, size: tuple, step: tuple, dimension: int, reference=None): if reference is None: from paradox.neural_network.convolutional_neural_network.operator import MaxPoolingND return Symbol(operator=MaxPoolingND(dimension, size, step), inputs=as_symbols([data])) else: from paradox.neural_network.convolutional_neural_network.operator import MaxReferencePoolingND return Symbol(operator=MaxReferencePoolingND(dimension, size, step), inputs=as_symbols([data, reference]))
def convolution_nd(data, kernel, dimension: int, mode, element_wise: bool = False): from paradox.neural_network.convolutional_neural_network.operator import ConvolutionND return Symbol(operator=ConvolutionND(dimension, mode, element_wise), inputs=as_symbols([data, kernel]))
def average_unpooling_nd(pooling, size: tuple, step: tuple, dimension: int, unpooling_size: int = None): from paradox.neural_network.convolutional_neural_network.operator import AverageUnpoolingND return Symbol(operator=AverageUnpoolingND(dimension, size, step, unpooling_size), inputs=as_symbols([pooling]))
def average_unpooling_2d(pooling, size: tuple, step: tuple, unpooling_size: tuple=None): from paradox.neural_network.convolutional_neural_network.operator import AverageUnpooling2D return Symbol(operator=AverageUnpooling2D(size, step, unpooling_size), inputs=as_symbols([pooling]), category=SymbolCategory.operator)
def average_pooling_2d(data, size: tuple, step: tuple): from paradox.neural_network.convolutional_neural_network.operator import AveragePooling2D return Symbol(operator=AveragePooling2D(size, step), inputs=as_symbols([data]), category=SymbolCategory.operator)
def max_unpooling_2d(data, pooling, size: tuple, step: tuple): from paradox.neural_network.convolutional_neural_network.operator import MaxUnpooling2D return Symbol(operator=MaxUnpooling2D(size, step), inputs=as_symbols([data, pooling]), category=SymbolCategory.operator)
def average_pooling_nd(data, size: tuple, step: tuple, dimension: int): from paradox.neural_network.convolutional_neural_network.operator import AveragePoolingND return Symbol(operator=AveragePoolingND(dimension, size, step), inputs=as_symbols([data]))
def max_unpooling_nd(data, pooling, size: tuple, step: tuple, dimension: int): from paradox.neural_network.convolutional_neural_network.operator import MaxUnpoolingND return Symbol(operator=MaxUnpoolingND(dimension, size, step), inputs=as_symbols([data, pooling]))