Without more information I can't really help you. But if you want to add a custom loss function to K-FAC you would have to write your own class in loss_functions.py and add a function to register it in layer_collection.py. Note that K-FAC only supports loss functions that are convex in the argument passed to them by the network (i.e. those that can define a valid GGN matrix).
Without more information I can't really help you. But if you want to add a custom loss function to K-FAC you would have to write your own class in loss_functions.py and add a function to register it in layer_collection.py. Note that K-FAC only supports loss functions that are convex in the argument passed to them by the network (i.e. those that can define a valid GGN matrix).