IRT-SystemX / ml4physim_startingkit

11 stars 2 forks source link

Custom Tensorflow model #12

Closed MaximeLee closed 7 months ago

MaximeLee commented 7 months ago

I would like to code a custom model in tensorflow. As of now, I only saw in your notebooks of to use your default Fully Connected Augmented Simulator in Tensorflow 4a_How_to_contribute_Tensorflow.ipynb.

If I want to do a custom architecture, how should I proceed? Is it possible to have a template in order to implement my custom class/model architecture?

daviddanan commented 7 months ago

I think the easiest way would be to considered what we refered as "Advance users" way in section III in https://github.com/IRT-SystemX/ml4physim_startingkit/blob/main/4_How_to_contribute.ipynb I am not saying it could not be done by using LIPS but there is much more boilerplate from my point of view.

You can see a complete example of that here https://github.com/IRT-SystemX/ml4physim_startingkit/blob/main/3b_Reproduce_baseline_result_advanced_configuration.ipynb

It is an example that show how to implement a model that is not available in LIPS. As far as i can tell, nothing should prevent you to use tensorflow by following the same logic. Of course, you would have to implement your own AugmentedSimulator class from scratch with a train and predict method in it.