# Contextual Attention
> we propose a new deep generative model-based approach which can not only **synthesize novel image structures** but also **explicitly utilize surrounding image features as references** during network training to make better predictions.
### features
1. multiple holes at arbitrary locations
2. variable sizes
### Purpose
Traditional method can only be used in background generation. However, this method can generate something that **can't be copied from the image**. For example, faces and objects.
## Core Tech
### CNN
CNN-based methods often create **boundary artifacts, distorted structures and blurry textures inconsistent with surrounding areas.**
### GAN(WGAN)
The whole network is trained end to end with reconstruction losses and two Wasserstein GAN losses [1, 13], where one critic looks at the global image while the other looks at the local patch of the missing region.
### Keypoints
We propose a novel contextual attention layer to explicitly attend on related feature patches at distant spatial locations.