def _num_conv_units(conv_layer):
 assert isinstance(conv_layer, (MaxoutConvC01B, ConvElemwise))
 weights = conv_layer.get_params()[0].get_value()
 if isinstance(conv_layer, MaxoutConvC01B):
  return weights.shape[(-1)]
 elif isinstance(conv_layer, ConvElemwise):
  return weights.shape[0]

def _num_conv_units ( conv_layer ) : assert isinstance ( conv_layer , ( MaxoutConvC01B , ConvElemwise ) ) weights = conv_layer . get_params ( ) [ 0 ] . get_value ( ) if isinstance ( conv_layer , MaxoutConvC01B ) : return weights . shape [ ( - 1 ) ] elif isinstance ( conv_layer , ConvElemwise ) : return weights . shape [ 0 ]
returns a conv layers number of output channels .