101 Curie Neural Network Lib - Can not change global context

Hi,

I call the setGlobalContext with any number, and it remains at 127.

Here is the code :

void setGContext(int gc)
{
CuriePME.setGlobalContext(gc);
uint16_t newGC = CuriePME.getGlobalContext();
if (newGC != gc)
{
Serial.print("Failed to ");
}
Serial.print("set Global Context to:");
Serial.println(gc);
Serial.print("Global context is Currently:");
Serial.println(newGC);
}

Output

Set Global context to 1
Failed to set Global Context to:1
Global context is Currently:127

It doesnt matter if I am in KNN or RBF mode, it always stays at 127.

Is there supposed to be 127 different contexts for each neuron ? There-by giving me the ability to have 17 different patterns ?

If so does this mean I could have a context for each OCR character I'm trying to match, as well as having one context with a category for every OCR character I'm trying to match.

So for example I could have context 5 for my general what is this character ( OCR image 0 - zero through to 9 - nice, so 10 digits learned in this context number 5. Then I could have (I'm not saying this is a good idea or even desirable - I'm just asking if its possible - so please nobody say this is a bad idea), a context for each digit, so context 10 is for only the number 0, 11 is only for the number 1 etc. I then test the image in the general context (5), if it fails to recognise, then iterate through each of the contexts from 10 - 19, and see if that matches the OCR image ?

Fixed: get/setGlobalContext(): get/set value from GCR instead of NCR by eriknyquist · Pull Request #20 · intel/Intel-Pattern-Matching-Technology · GitHub