An elementwise multiplication won’t change the number of elements in the tensors, so you would have to view or reshape the tensor into the desired shape.
If channels*height*width is larger than K, you could create a new tensor via output = torch.zeros(batch_size, channels, height, width) and copy the reshaped input into it.