All the basic layers used keratorch.
class Layer:
def __init__(self, input_shape=None):
# breakpoint()
self.input_shape = input_shape
def __set_io_shape__(self, input_shape):
if input_shape is None and self.input_shape is None:
__inputDimError__("Need to specify input shape in first layer")
elif input_shape:
self.input_shape = input_shape
Dense(3, activation='mish').get_layer(5)
out_layer = Conv2D(5, activation='Relu', input_shape=(1, 10, 10)).get_layer()
print(out_layer)
conv_layer = out_layer['layers'][0]
conv_layer(torch.zeros((1, 1, 10, 10))).shape
out_layer = Conv2D(5, activation='Relu').get_layer((1, 10, 10))
print(out_layer)
conv_layer = out_layer['layers'][0]
conv_layer(torch.zeros((1, 1, 10, 10))).shape
out_layer = MaxPool2D(2, input_shape=(1, 10, 10)).get_layer()
print(out_layer)
maxpool_layer = out_layer['layers'][0]
maxpool_layer(torch.zeros((1, 1, 10, 10))).shape
out_layer = MaxPool2D(2).get_layer((1, 10, 10))
print(out_layer)
maxpool_layer = out_layer['layers'][0]
maxpool_layer(torch.zeros((1, 1, 10, 10))).shape
flatten = Flatten((5, 3))
flatten.get_layer()
Activation('softmax').get_layer()