<div dir="ltr"><div>Hi Junxiao,</div><div><br></div><div>Thanks so much for the reply. It really clears up some questions I had about how to use ndnSIM. I'll probably implement it the asynchronous way and have the C++ and Python code communicate using files.<br></div><div><br></div><div>Eric<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, May 8, 2021 at 7:24 AM Junxiao Shi <<a href="mailto:shijunxiao@email.arizona.edu">shijunxiao@email.arizona.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div dir="auto">HiĀ Eric</div><div><br><div class="gmail_quote"></div></div></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br></div><div>I'm trying to implement a neural network to do forwarding in ndnSIM. I know this is possible to do in ndnSIM because these papers do it: <a href="https://www.mdpi.com/1424-8220/18/10/3354/htm" target="_blank">https://www.mdpi.com/1424-8220/18/10/3354/htm</a>, <a href="https://dl.acm.org/doi/pdf/10.1145/3229543.3229547" target="_blank">https://dl.acm.org/doi/pdf/10.1145/3229543.3229547</a>.</div><div><br></div><div>Does anyone have any recommendations on how to implement a neural network? If possible, I would like to do it in Python even though most of the ndnSIM code is in C++. Is it possible to use the Python bindings to write a forwarding strategy in Python, so that I can use a neural network library like keras?</div></div></blockquote><div dir="auto"><br></div></div><div><div dir="auto">Forwarding strategy is normally a C++ class that is called synchronously.</div><div dir="auto">C++ code can invoke Python synchronously.</div><div dir="auto">Implementing part of the forwarding strategy logic in Python wouldn't be easy or performant, but I don't see major roadblock.</div><div dir="auto">It would not be a "binding" though, because a "binding" typically refers to calling C++ code from Python, not the other way around.<br></div><div dir="auto"><br></div><div dir="auto">Another possibility is performing machine learning asynchronously.</div><div dir="auto">In this approach, the forwarding strategy (C++) and the neural network (Python) share a common data structure, but do not interact with each other on a per packet basis.</div><div dir="auto">The forwarding strategy makes immediate decisions based on what's already in the data structure, and stores the outcome (e.g. satisfy ratio and RTT) into the data structure.</div><div dir="auto">The neural network periodically reads from the date structure, does its magic, and writes to the data structure to influence future forwarding decisions.</div><div dir="auto"><br></div><div dir="auto">Yours, Junxiao</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="auto"></div></div></blockquote>
</div>
</blockquote></div>