ValueError: optimizer got an empty parameter list (nn.parameter is not persistent across parent classes)

  python, pytorch

how to make nn.parameter() persists across parent classes ?

in my coding: class Graph → class Cells → class nodes → class Connections → class Edge

the nn.parameter() is located inside class Edge

error

Source: Python Questions

LEAVE A COMMENT