SciSharp / TensorFlow.NET

.NET Standard bindings for Google's TensorFlow for developing, training and deploying Machine Learning models in C# and F#.
https://scisharp.github.io/tensorflow-net-docs
Apache License 2.0
3.2k stars 514 forks source link

refactor: Standardize TensorFlowNET.Keras/Losses/* #1089

Closed DevNullx64 closed 1 year ago

DevNullx64 commented 1 year ago

abstract Loos.Apply instead of virtualy throw exception abstract class LossFunctionWrapper Smooth implementation of sub class Move ILossFunc to base abstract class Loss

Oceania2018 commented 1 year ago

Why do we remove ILossFunc? It's designed to decouple the Tensorflow.Binding with Tensorflow.Keras projects. ILossFunc is the standard interface between the two projects. I think what we need to do is changing all the loss function to implement the interface, then in Tensorflow.Binding can use Keras loss functions.

DevNullx64 commented 1 year ago

I've put the ILossFunc implementation on base Loss abstract class. Everithing that inherit from Loss inherit ILossFunc.