tscohen / GrouPy

Group Equivariant Convolutional Neural Networks
http://ta.co.nl
Other
349 stars 85 forks source link

How to generate your code to VGG16 architecture? #19

Closed a14en9 closed 4 years ago

a14en9 commented 4 years ago

Hi Dr. Cohen,

Thank you for releasing GrouPy.

I'd like to build an architecture that is similar to VGG16. If we ignore the computational cost without reducing the number of filters. Can I achieve p4m properties by simply inserting the following layers right after vgg5_3, please? (we retain all of CNN layers in VGG16)

gconv_indices, gconv_shape_info, w_shape = gconv2d_util( h_input='Z2', h_output='D4', in_channels=3, out_channels=64, ksize=3) w = tf.Variable(tf.truncated_normal(w_shape, stddev=1.)) y = gconv2d(input=x, filter=w, strides=[1, 1, 1, 1], padding='SAME', gconv_indices=gconv_indices, gconv_shape_info=gconv_shape_info)

gconv_indices, gconv_shape_info, w_shape = gconv2d_util( h_input='D4', h_output='D4', in_channels=64, out_channels=64, ksize=3) w = tf.Variable(tf.truncated_normal(w_shape, stddev=1.)) y = gconv2d(input=y, filter=w, strides=[1, 1, 1, 1], padding='SAME', gconv_indices=gconv_indices, gconv_shape_info=gconv_shape_info)

Or, can i say that I can achieve p4m by training dense layers and above layers and then fine-tuning the whole networks? After training, can i say they have properties, such as symmetry and orthogonal? Suppose that we obtain a feature in size of (batch_size, height, width, channel*8), can we achieve transformation-invariant feature by reducing it into (batch_size, height, width, channel). If we can, which is better between reduce_mean and reduce_max?

Thanks!