A tremendously useful explainer about symbolic APIs (Sequential + Functional API) and Model subclassing in TF 2.0, by @random_forests:https://medium.com/tensorflow/what-are-symbolic-and-imperative-apis-in-tensorflow-2-0-dfccecb01021 …
-
-
I think it's great that we don't silo researchers and everyone else into completely separate frameworks. It's all one API, that enables a spectrum of workflows, from really easy (Sequential) to advanced (Functional) to fully flexible and hackable (Model subclassing)
Show this threadThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Is there a way to relax the requirement that loss func take in 2 Tensors of same shape? I have resort to some hack that hurt perf to trade off for some external elegance. If I m wrong, I will be glad to be enlightened.
-
Just call `layer.add_loss(loss_tensor)` or `model.add_loss(loss_tensor)` with a tensor you've computed yourself
- Show replies
New conversation -
-
-
Functional API is the best. Started with Sequential but once you try functional API there is no turning back. It feels so natural to work with it!
-
Yes, I think this gives you flexibility of not doing a subclass. There r situation where a functional programming approach is better than pure OOP.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.