<div><div dir="auto">HiĀ Eric</div><div><br><div class="gmail_quote"></div></div></div><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="auto"></div></div></blockquote>
</div>