AttributeError: module 'torch.jit' has no attribute 'get_trace_graph

pytorch+python

错误:

 

 纠正:

self.trace, _ = torch.jit.get_trace_graph(self.model, args=(self.x,))

为:

self.trace, _ = torch.jit._get_trace_graph(self.model, args=(self.x,))
问题解决
posted @ 2020-09-25 15:09  皮卡皮卡妞  阅读(3126)  评论(0编辑  收藏  举报