im2perpixel layer, invert gradient layer