It looks like you provided an image with shapes [batch_size, w, h, channels] instead of [batch_size, channels, h, w].
How did you load your images?
You can use non square images without a problem. If you need a non square kernel, you can provide the kernel_size as a tuple: kernel_size=(kh, kw).