Text this: A 218 GOPS neural network accelerator based on a novel cost-efficient surrogate gradient scheme for pattern classification.