Replies: 3 comments 1 reply
-
@avan1235 @therealansh if you have any thoughts to add, please write here (you faced with some problems here, your feedback will be useful) |
Beta Was this translation helpful? Give feedback.
-
Hi @zaleslaw , i do agree with @mkaze about the redundant code in the testing. Also, the abstraction of some functions making a utility/helper class like keras/tf does in |
Beta Was this translation helpful? Give feedback.
-
Reusing multik from my perspective looks like the best idea as for now there are many other fields that need develepers time and reinventing the wheel usually sounds like a bad idea. The good thing about the multik is that we can just depend on its api and in future, if needed, create own implementation (as the api looks pretty in my opinion and makes it simpler to work with arrays especially for the people experienced with numpy). The other point is that, for now, we are talking only about the usage of ndarrays in tests phase, which doesn't have to be the fastest possible and the scale (the sizes of arrays) of test examples don't seem to be large enough to see the actual difference in execution time. We definitely need the "AbstractExecutor" of test that would be able to use the graph or eager mode of TF to evaluate the test. In my opinion creating the interfaces here with default methods and default properties could be some good approach (that I have recently used with traits in Scala and worked well in combining tests but traits are a little bit different than interfaces). We would have some I would start with creating the Tensor API that for now would be backed by TF Tensor implementation. Then creating the whole package under the *.api.tensor with the concrete converters that would be functions of Tensor API and the extension functions of multik api ndarrays. That would simplify the future work with some other integrations than TF and looks suitable for this pupose while working only with extension function could force us to future refactors of this code when TF Tensor would change. On the other hand writing such Tensor API seems like creating the copu of multik ndarray API, so maybe the best idea would be to try to implment this multik API with TF Tensor as a backaend extended with a few extra conversion functions? For the tests writing and repeating hierarchy I am not sure if it flll be suitable in any case (I mean that the implementations hierarchy doesn't have to correspond to tests' needs) but what about wringing some tests functionalities also with interfaces? I mean creating e.g. the interface with methods for creating random tensors as default methods and just derive from them (getting in this way well structured and organized test helper functions that would be groupped in the interfaces according to their capabilities as importing single Kotlin functions may be sometimes problematic but it is another good approach) |
Beta Was this translation helpful? Give feedback.
-
@mkaze wrote in the PR #103
I want to add some ideas about layer functionality testing.
Beta Was this translation helpful? Give feedback.
All reactions