Libr-AI / fairlib

A framework for assessing and improving classification fairness.
https://hanxudong.github.io/fairlib/
Apache License 2.0
33 stars 8 forks source link

init hidden layers earlier #24

Closed SimonSuster closed 1 year ago

SimonSuster commented 1 year ago

When adv_level was set to "input", get_cls_parameter() could not get self.hidden_layers.parameters() as the hidden layers were not initialised yet, throwing

AttributeError: 'MLP' object has no attribute 'hidden_layers'.

I've changed the code so that the hidden layer init happens earlier.