A mechanistically interpretable neural network for regulatory genomics