Hi,
I’m interested in the neuromorphic hardware available, Akida. How can I create my own code to be launched in the platform? Thanks
Hi,
I’m interested in the neuromorphic hardware available, Akida. How can I create my own code to be launched in the platform? Thanks
Hi @rparada
Do you have any specific model in mind? If so, we can guide you to upload the model to our AI hub and run it on our hosted hardware.
Hi @shashi. Thank you for you fast response. My code is based on snntorch to classify various brain states on some functions. Is it possible to convert a snntorch code to Akida and then to be executed in your platform? Thanks!
Hi @rparada
Our expertise on such networks is limited. I will forward your request to Brainchip team and see if they can help. I will keep you posted. Thank you for your patience.
I really appreciate your effort to solve this request. Take your time. Thank you!
Hi @shashi, do you have any update regarding this request? thanks.
Hi @raul.parada.medina
We will check back with the brainchip team to see if they have any updates.
Hi @raul.parada.medina, unfortunately, we have not yet received an update from BrainChip regarding this request.
In the meantime, it may be worthwhile to reach out directly to the BrainChip team to express your interest and potentially get a quicker response. If we hear anything on our end, we’ll be sure to update this thread right away.
Hi @alex and @shashi for your reply, it looks there is no update from Brianchip in this sense. Please, could you tell me how to upload this model in the platform? Age estimation (regression) example — Akida Examples documentation. Thanks!
@stephan-degirum
Can you please help @raul.parada.medina ?
Hello @raul.parada.medina , conversion of a model from BrainChip’s model zoo into our format is straightforward:
Once you have an Akida model object, like Step 4 in the example:
model_akida = convert(model_quantized_keras)
from akida import devices
# Map model onto your Akida device
dev = devices()[0]
try:
model_akida.map(dev, hw_only=True)
except RuntimeError:
model_akida.map(dev, hw_only=False)
# Extract the C++-compatible program blob
blob = model_akida.sequences[0].program
with open("model_cxx.fbz", "wb") as f:
f.write(blob)
print("C++-compatible model written to model_cxx.fbz")
Note: You want to be sure that the model is supported on your Akida device. There are many models on the BrainChip model zoo that are not compatible with their “version 1 IP” devices.
If your device is a v1 device, you’ll need to add a set_akida_version
guard:
from cnn2snn import convert, set_akida_version, AkidaVersion
# Convert the model
with set_akida_version(AkidaVersion.v1):
model_akida = convert(model_quantized_keras)
model_akida.summary()
from akida import devices
# Map model onto your Akida device
# ... (see above)
for more information on v1/v2 model compatibility please see their docs: Akida models zoo — Akida Examples documentation
Create a model JSON file adjacent to the blob by following Model JSON Structure | DeGirum Docs or by looking at existing BrainChip models on our AI Hub for reference: https://hub.degirum.com/degirum/brainchip
ModelPath
is your binary model file
RuntimeAgent
is AKIDA
DeviceType
is the middle output from akida devices
in all caps.
For example for if akida devices shows: PCIe/NSoC_v2/0 you put: NSOC_V2
Your JSON + binary model blob are now compatible with PySDK. Try running the inference on your device locally by specifying the full path to the JSON as a zoo_url
, see: PySDK Package | DeGirum Docs
“For local AI hardware inferences you specify zoo_url
parameter as either a path to a local model zoo directory, or a path to model’s .json configuration file.”
You can then zip them up and upload them to your model zoo in our AI Hub.
Let me know if this helped.
P.S. we currently have v1 hardware in our cloud farm, and this model is the face estimation model for NSoC_v2: https://hub.degirum.com/degirum/brainchip/vgg_regress_age_utkface--32x32_quant_akida_NSoC_1