def cnn_class_binary(self): """Create ConvNet with prediction layer.""" return ConvNet(name='Test_ConvNet_class', in_dim=(1, 28, 28), config={ 'conv_units': [{ "in_channels": 10, "out_channels": 16, "kernel_size": (5, 5), "stride": 2 }, { "in_channels": 16, "out_channels": 1, "kernel_size": (5, 5), "stride": 1, "padding": 2 }] }, num_classes=2)
def cnn_class(self): """Create ConvNet with classes fixture.""" from vulcanai.models.cnn import ConvNet return ConvNet(name='Test_ConvNet_class', in_dim=(1, 28, 28), config={ 'conv_units': [{ "in_channels": 1, "out_channels": 16, "kernel_size": (5, 5), "stride": 1, "padding": 2 }, { "in_channels": 16, "out_channels": 1, "kernel_size": (5, 5), "stride": 1, "padding": 2 }] }, num_classes=3)
def cnn_noclass(self): """Create intermediate conv module.""" return ConvNet( name='Test_ConvNet_noclass', in_dim=(1, 28, 28), config={ 'conv_units': [ { "in_channels": 1, "out_channels": 16, "kernel_size": (5, 5), "stride": 2 }, { "in_channels": 16, "out_channels": 1, "kernel_size": (5, 5), "stride": 1, "padding": 2 }] }, )