Text this: Gradient matching for domain generalization