Last year, quite a few people talked about KFAC, but it might not be too easy to fit into the pytorch optimizer framework.
One of the most prominent implementations seems to be this:

  
      github.com
  
  
    yaroslavvb/kfac_pytorch/blob/master/kfac_pytorch.py 75
import util as u
u.check_mkl()

import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torch.autograd import Variable
import numpy as np
import scipy
import sys

from torch.autograd.function import Function

def regularized_inverse(mat, lambda_=3e-3, inverse_method='numpy',
                        use_cuda=True):
  assert mat.shape[0] == mat.shape[1]
  ii = torch.eye(mat.shape[0])
  if use_cuda:
    ii = ii.cuda()


  This file has been truncated. show original

  
  
    
    
  
  


Best regards
Thomas