Skip to content

RuntimeError: grad can be implicitly created only for scalar outputs #1

@Ression-LZ

Description

@Ression-LZ

Hi, I tried to run your code, but there is a problem:
File "/home/lamo/PycharmProjects/FedSL-master/models/UpdateSplit.py", line 72, in train clientH.backward(h_grads)
RuntimeError: grad can be implicitly created only for scalar outputs
Could you please tell me how to fix it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions