This repository contains code in SageMath for computing the dimension of functional varieties of polynomial networks.
Paper: Joe Kileel*, Matthew Trager*, Joan Bruna. On the Expressive Power of Deep Polynomial Neural Networks. NeurIPS, 2019
Note: the code runs on Sage 8.x, that is based on Python 2 (to use with Sage 9, only minor modifications are necessary).
The code can also be run online here (scrolling to the bottom to change parameters).
The backpropagation and network class were based on code samples from Michael Nielsen's book "Neural Networks and Deep Learning".