You could run a loop over the 100 entries in the first dimension, e.g.:
import torch

#x = torch.rand(100, 64, 256, 256)
x = torch.rand(100, 64, 3, 3) # reduced for testing

def max_exclusive(x, i):
    a,b = x[:i], x[i+1:]
    if a.nelement() == 0:
        return torch.max(b, 0)[0]
    if b.nelement() == 0:
        return torch.max(a, 0)[0]
    return torch.max(torch.max(a, 0)[0], torch.max(b, 0)[0])

#y = torch.cat([max_exclusive(x, i).unsqueeze(0) for i in range(x.size(0))])

# or manually if you do not want to store intermediate results:
y = x.new_empty(x.size())
for i in range(x.size(0)):
    y[i] = max_exclusive(x, i)

print(y.size())