def ggn_mp(self, mat_list):
     assert len(mat_list) == len(list(self.model.parameters()))
     results = []
     with backpack(new_ext.CMP(Curvature.GGN)):
         self.loss().backward()
         for p, mat in zip(self.model.parameters(), mat_list):
             results.append(p.cmp(mat))
     return results
Exemple #2
0
def test_interface_cmp_conv():
    interface_test(new_ext.CMP(), use_conv=True)
Exemple #3
0
def test_interface_cmp():
    interface_test(new_ext.CMP())