keras-tuner
                                
                                
                                
                                    keras-tuner copied to clipboard
                            
                            
                            
                        HyperResNet with binary classification
Hi maintainers,
I am using HyperResNet for a binary classification problem, and ended up subclassing it to modify the last layer and loss to be suitable for binary classification rather than multi-class. I wondered whether this would make a welcome addition – if it would, I'd be happy to come up with a PR.
Thank you for all your marvelous work!
@ZviBaratz
Usually for this use case, we would suggest using HyperResNet(include_top=False).
However, it is strange for HyperResNet to use multi-class settings for binary classification.
We may want to add a condition if self.classes==2: to this part and add the binary case there.
Thank you for the issue! Let me know if you are still interested in contributing.
Hi @haifeng-jin, thank you for your response. I'd be happy to propose a PR (also for HyperXception, as it has the same issue). I'm a little busy in the next couple of weeks, but I'll try to come up with something whenever I free up a little bit.
All the best :pray:
@ZviBaratz , Sure, Thank you! If it is common for both classes, we may try to extract a super class, or so-called mixin, to reuse the code.
Sorry, can't seem to be able to fit this in. Just updating in case anyone else is interested in taking this on.