Hello,
I am trying to implement online learning like Keyword spotting example. I am using MNIST dataset. I separated training data (0 to 6 labels) and for online learning i will use 7, 8 and 9 labels.
I checked my model compatibility. i quantize and convert the model into akida. I add fully connected layer for edge learning.
But when i try to compile the akida model it shows an error.
ValueError Traceback (most recent call last)
Cell In[19], line 3
1 # Compile Akida model with learning parameters
2 from akida import AkidaUnsupervised
----> 3 akida_model.compile(optimizer=AkidaUnsupervised(num_weights=num_weights,
4 num_classes=num_classes,
5 learning_competition=0.1))
6 akida_model.summary()
ValueError: Only layers receiving binary inputs can be trained.
I am not sure what you mean by âonline learningâ.
Also, just to be sure you are on the correct path, Akida learning blocks are only for Brainchip hardware. Is it what you expect?
Hello @louis,
Thanks for getting back to me.
I was trying to implement the edge learning example given in the Akida edge learning for keyword spotting page. Yes, I am using Brainchip hardware for learning.
I used the MNIST dataset and trained and quantized the model using âkerasâ and âcnn2snnâ, as mentioned in the link. For initial training, I used the MNIST 0-6 label dataset and the remaining for edge learning. Unfortunately, when I tried to compile the model before initiating edge learning, I got âValueError: Only layers receiving binary inputs can be trained. â I have attached my Jupyter Notebook file for your reference. MNIST Edge learning
Hi @Rashedul
Edge Impulse has not yet supported Edge Learning capabilities for Akida. It is going to be added in the coming weeks.
However, regarding your problem, to fix the issue you need to make sure the last layer is FullyConnected layer. Please refer to the BrainChip documentation for details.
Hello @mateusz ,
I am a little confused now. I am just trying to implement the example shown in [ Akida edge learning for keyword spotting ]. Instead of downloading a pre-trained model as shown in the example, I am using the MNIST dataset and training it by myself using the MetaTF framework. I tried to follow all the steps shown in the example as well. I quantized the model and replaced the last layer with a fully connected layer as described, but I got the error.
I have a couple of doubts:
1.Can I build my own model and implement edge learning instead of downloading a pre-trained quantized model?
2. As mentioned in the document, I used MetaTF and cnn2snn to train and quantize the model. However, I do not think I have received binary spikes in the last year. How do you quantize your model to produce the appropriate binary spikes?
@Rashedul
For these Akida/MetaTF-specific questions, I have to redirect you to BrainChip support. Please contact them. If you donât get any response, let us know, we will try through other channels.
@leni
I am also a newbie, but I am not sure which type of coding you want to learn. If you want to learn spiking, I think SnnTorch will be a good place to start. If you want to learn Akida, I would say simply try to implement their example.
Hello @mateusz, Could you please provide the email address of someone I can reach out to regarding the MetaTF framework? I really need someone to help me. I emailed the support team but did not get any response.