Closed sathvikbhagavan closed 1 year ago
isinstance(self, neurodiffeq.solvers.Sovler1D)
Yes, there was no particular reason to use strings. We should definitely use isinstance
in the future
A possible concern is what if someone write their own subclass with multiple inheritance
Yes, I have assumed no multiple inheritance where the common case is to inherit neurodiffeq solvers for additional loss. We should tackle that for saving and loading in the future
A possible concern is what if someone write their own subclass with multiple inheritance
where
SomeOtherClass
precedesSolver1D
In this case, we need to check
self.__class__.__bases__[1]
instead ofself.__class__.__bases__[0]