tensorflow / kfac

An implementation of KFAC for TensorFlow
Apache License 2.0
197 stars 40 forks source link

how to customize loss function? #33

Open GIS-PuppetMaster opened 4 years ago

james-martens commented 4 years ago

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).