First commit. Some combinations of input dimensions and W/D doesn't work properly