Imported from https://github.com/clausmichele/ViDeNN