hello, I change output one layer and I want this change again feed to network (input this change to network). I write below code but no changes are applied to the network !!! please help me.
model.conv3.register_forward_hook(get_activation('conv3'))

x, labels = next(iter(test_loader))

a = activation['conv3']

a[9,0,1,:]=a[9,0,2,:]

a[9,0,2,:]=a[9,0,3,:]

a[9,0,3,:]=a[9,0,4,:]

activation['conv3']=a

output = model(x)

plt.subplot(1, 3, 1)

plt.imshow(output[9][0].detach().numpy(), cmap="gray") 

#print(activation['conv3'])

plt.subplot(1, 3, 2)

plt.imshow(activation['conv3'][9][0], cmap="gray") 

plt.subplot(1, 3, 3)

plt.imshow(x[9][0], cmap="gray")