Compact neural networks using condensed filters
A compact neural network system can generate multiple individual filters from a compound filter. Each convolutional layer of a convolutional neural network can include a compound filters used to generate individual filters for that layer. The individual filters overlap in the compound filter and can be extracted using a sampling operation. The extracted individual filters can share weights with nearby filters thereby reducing the overall size of the convolutional neural network.
1. A method comprising:
generating, using one or more processors of a machine, an image;
generating, from a compound neural network filter, a plurality of additional filters, wherein the plurality of additional filters are kernels of a convolution layer in a convolutional neural network;
generating, using the convolutional neural network, a modified image from the image, the convolutional neural network configured to generate the modified image by applying the plurality of additional filters to the image; and
causing the modified image to be displayed on a network site.
2. The method of claim 1 , wherein the plurality of additional filters are generated by sampling the compound neural network filter.
3. The method of claim 2 , wherein the plurality of additional filters overlap in the compound neural network filter.
4. The method of claim 1 , wherein the plurality of additional filters share weights.
5. The method of claim 1 , wherein the convolutional neural network comprises a plurality of convolution layers, each convolution layer having a corresponding compound neural network filter configured to generate a plurality of individual filters for that convolution layer, the plurality of convolution layers comprising the convolution layer.
6. The method of claim 5 , further comprising:
generating, for each of the convolution layers, a set of additional filters from a corresponding compound filter.
7. The method of claim 1 , wherein at least one of the plurality of additional filters is generated using a rotation operation.
8. The method of claim 1 , wherein at least one of the plurality of additional filters is generated using a reflection operation.
9. The method of claim 1 , wherein the convolutional neural network is configured to perform image segmentation.
10. The method of claim 1 , wherein the convolutional neural network is configured to perform image style transfer.
11. The method of claim 1 , wherein the modified image is published as an ephemeral message on the network site.
12. A system comprising:
one or more processors of a machine; and
a memory storing instructions that, when executed by the one or more processors, cause the machine to perform operations comprising:
generating, using one or more processors of a machine, an image;
generating, from a compound neural network filter, a plurality of additional filters, wherein the plurality of additional filters are kernels of a convolution layer in a convolutional neural network;
generating, using the convolutional neural network, a modified image from the image, the convolutional neural network configured to generate the modified image by applying the plurality of additional filters to the image; and
causing the modified image to be displayed on a network site.
13. The system of claim 12 , wherein the plurality of additional filters are generated by sampling the compound neural network filter.
14. The system of claim 13 , wherein the plurality of additional filters overlap in the compound neural network filter.
15. The system of claim 12 , wherein the plurality of additional filters share weights.
16. The system of claim 12 , wherein the convolutional neural network comprises a plurality of convolution layers, each convolution layer having a corresponding compound neural network filter configured to generate a plurality of individual filters for that convolution layer, the plurality of convolution layers comprising the convolution layer.
17. A machine-readable storage device embodying instructions that, when executed by a machine, cause the machine to perform operations comprising:
generating, using one or more processors of a machine, an image;
generating, from a compound neural network filter, a plurality of additional filters, wherein the plurality of additional filters are kernels of a convolution layer in a convolutional neural network;
generating, using the convolutional neural network, a modified image from the image, the convolutional neural network configured to generate the modified image by applying the plurality of additional filters to the image; and
causing the modified image to be displayed on a network site.
18. The machine-readable storage device of claim 17 , wherein the plurality of additional filters are generated by sampling the compound neural network filter.