Passing the server gradients to client to compute the client gradients

Hi everyone,
this is my 1st post in this forum, I am new in this forum. So, I am trying to pass the server input’s gradients to client , so that I can compute the cleint’s gradients.

I tried many things so far. But it gives me client gradient as None.
This is the code snippet that gives me None for client gradients,
client_gradients = tape.gradient(server_inputs, client_output) : this is in tensorflow, : ← Not working

**in PyTorch it works for what I am trying to do, **
This is working in pytorch => client_output.backward(server_input.grad)

=> i checked these things already,

  • I have my client_output, it not none or partially none
  • server_input is entact as well.

So anyone, who has previous knowledge of Federated Learning or split learning, please help me figure this out in tensorflow. Please!!