@jpeg729 Since I am sharing part of the network for multiple configurations, I am getting the error that I should set  retain_graph=True. But doing so runs me out of memory. Is there a better way of describing the graph and sharing parts of the network so that this doesn’t happen. Please let me know.