Text this: Weight assignment for adaptive image restoration by neural networks.