I've got 2 versions of the neural network files, CuriePME.h and CuriePME.cpp. They have no version which is ridiculous, so which should I be using ?
and why do they have the same name as the general vision files, and they are almost identical ?
The headers are different, in that one has a
static const uint32_t noMatch = 0x7fff;
And one doesnt. Also is this really the correct value that comes back when there is not match from a classify ?
The code in one function looks like this :
uint16_t Intel_PMT::learn(uint8_t *pattern_vector, int32_t vector_length, uint16_t category)
{
if( vector_length > MaxVectorSize )
vector_length = MaxVectorSize;
for( int i = 0; i < vector_length -1; i++ )
{
regWrite16( COMP , pattern_vector );
- }*
- regWrite16( LCOMP, pattern_vector[ vector_length - 1 ] );*
_ /* Mask off the 15th bit-- valid categories range from 1-32766,_
_ * and bit 15 is used to indicate if a firing neuron has degenerated */_ - regWrite16(CAT, (regRead16(CAT) & ~CAT_CATEGORY) | (category & CAT_CATEGORY));*
- return regRead16( FORGET_NCOUNT );*
}
So is this the correct cpp ?It seems to be the one you pointed me at recently. The other file I've got looks like this :
uint16_t Intel_PMT::learn(uint8_t *pattern_vector, int32_t vector_length, uint8_t category)
{ - if( vector_length > MaxVectorSize )*
- vector_length = MaxVectorSize;*
- for( int i = 0; i < vector_length -1; i++ )*
- {*
regWrite16( COMP , pattern_vector );
* }*
* regWrite16( LCOMP, pattern_vector[ vector_length - 1 ] );
_ regWrite16( CAT, category );_
return regRead16( FORGET_NCOUNT );
_}*_