VinF / deer

DEEp Reinforcement learning framework
Other
485 stars 126 forks source link

Update of dump network and set network #88

Closed ghost closed 3 years ago

ghost commented 3 years ago

Implementation of dumpNetwork and setNetwork using embedded Keras functionalities. The system now saves 2 files for each model, the network architecture as Json file and the model weights as h5 file. I also added an optional parameter to the dumpNetwork function to indicate if we want to save the NN from the test_policy or train_policy.

VinF commented 3 years ago

Thanks for the commits! To make it also usable for other learning algos than q-learning (e.g. the DDPG or the CRAR one), would it be possible to pass directly the neural networks? For instance in actor-critic there would be two calls to the function with the actor network and the critic network? And it would also avoid needing the argument "train_test". It would be great if it's as modular as possible for the other possible use cases.

ghost commented 3 years ago

Sure, Do you want to have an optional parameter where you can pass the NN and if it is not defined it default to the training NN. When we load it, which NN should we do the same, optional parameter to indicate which NN should be updated and defaulting to update TRAIN and TEST ones ?

From: VinF @.> Sent: Monday, 3 May 2021 11:27 To: VinF/deer @.> Cc: Olivier Moulin @.>; Author @.> Subject: Re: [VinF/deer] Update of dump network and set network (#88)

Thanks for the commits! To make it also usable for other learning algos than q-learning (e.g. the DDPG or the CRAR one), would it be possible to pass directly the neural networks? For instance in actor-critic there would be two calls to the function with the actor network and the critic network? And it would also avoid needing the argument "train_test". It would be great if it's as modular as possible for the other possible use cases.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FVinF%2Fdeer%2Fpull%2F88%23issuecomment-831139072&data=04%7C01%7C%7C67cd7898a45b423f191a08d90e15a43f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637556308374181354%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=uZe8p6yOi7%2By3e5MoMcbvNlbd1yQvEOVr00%2FUrfqSMc%3D&reserved=0, or unsubscribehttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAPZPKWGMBZJFRVNDZBD2ZHTTLZT7FANCNFSM436IIL6Q&data=04%7C01%7C%7C67cd7898a45b423f191a08d90e15a43f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637556308374181354%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=WNj%2BDNeIdBr1OX0JbMEKi84isC3Lhdv6e9xHaXgXqro%3D&reserved=0.

VinF commented 3 years ago

I'm closing this for now. We can reopen when we have found a solution to the problems that we discussed.

ghost commented 3 years ago

sure, I need to think a little bit deeper on that :) currently focussed on writing and on the hackathlon (not passionate about it, I was thinking it would be AI related... but now I am part of it I need to work on it ...)

Sent from my iPhone

On 15 May 2021, at 11:03, VinF @.***> wrote:



I'm closing this for now. We can reopen when we have found a solution to the problems that we discussed.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FVinF%2Fdeer%2Fpull%2F88%23issuecomment-841626447&data=04%7C01%7C%7C6396e676c7a0462c87d908d917804648%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637566661960530719%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=O%2F%2Fo4IkrSBJfcC0pfNejDGe21xfgEv9oopJvxkgv1Oo%3D&reserved=0, or unsubscribehttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAPZPKWAWWEGQU2NRJXQBNJLTNY2FFANCNFSM436IIL6Q&data=04%7C01%7C%7C6396e676c7a0462c87d908d917804648%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637566661960530719%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=taNOQx2FIL5VHUrTDLvtk6IgbBFMZ%2BD8x18tzRwF1Xw%3D&reserved=0.