Group Abstract Group Abstract

Message Boards Message Boards

0
|
1.8K Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

CompiledLayer error: Cannot find a definition for the function IntegerDigits

Posted 1 year ago

Hi,

I have 192 0/1 inputs for a neural network that are packed as 24 8-bit integers. These have to be unpacked before training, for example by using Flatten[IntegerDigits[#, 2, 8]]. When I try to use this expression within a FunctionLayer I am getting 'Compilerr' errors and I have not been able to find a workaround yet. Meanwhile I also found 'CompiledLayer' in the documentation, but when I try to use it as in:

CompiledLayer[
 Function[{Typed[input, 
    TypeSpecifier["NumericArray"]["MachineInteger", 1]]}, 
  Flatten[IntegerDigits[input, 2, 8]]], None]

I am getting the error 'Compile::err: TypeError. Cannot find a definition for the function IntegerDigits that takes arguments with the types NumericArray[Integer64, 1:Integer64], Integer64 and Integer64.' I have tried other TypeSpecifiers but I always get this error.

Any ideas?

Regards,
GW

Please see FunctionLayer error compilerr: Cannot interpret as a network for a way to achieve this using NetEncoder.

Regards, GW

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard