tensorflowlite on Redboard artemis Nano

I can not get the Tensorflow Lite examples to compile for the Artemis nano. I get an error saying that the macro F is not happy about getting more than one argument:

error: macro “F” passed 2 arguments, but takes just 1

output_data = F(input1_data, input2_data);
I am currently on an Ubuntu machine running Arduino IDE 1.8.12, Tensorflow Lite 2.4.0-ALPHA, and Sparkfun Apollo3 Boards 2.0.5.
Tried running this same combination on windows and had the same error.
Any help would be appreciated!

Thanks for reaching out to us on this.

The portion of the code

output_data = F(input1_data, input2_data);

is definitely passing 2 arguments (input1_data,input2_data)

Perhaps try removing the input2_data portion? If that doesn’t work, following what the user did in this post might help: https://forum.sparkfun.com/viewtopic.php?t=52065

Finally, it might be helpful to start-over altogether, following this guide: https://www.hackster.io/javagoza/artemi … -example-8 with a micro speech example.

Hope this helps, and happy sparking!

hugoleon00:
I can not get the Tensorflow Lite examples to compile for the Artemis nano. I get an error saying that the macro F is not happy about getting more than one argument:

error: macro “F” passed 2 arguments, but takes just 1

output_data = F(input1_data, input2_data);
I am currently on an Ubuntu machine running Arduino IDE 1.8.12, Tensorflow Lite 2.4.0-ALPHA, and Sparkfun Apollo3 Boards 2.0.5.
Tried running this same combination on windows and had the same error.
Any help would be appreciated!

[/quote]
Did you ever mange to get it working I’ve been having the same problems

Something has already defined F which is used in the template as the comparison function parameter name. I didn’t have time to look for where, I just renamed the function parameter F to __F in the template functions to avoid the name collision. I also changed ComparisonFn to __ComparisonFn . The parameter F appears in 13 places in the file. Be sure and changed them all to __F.

Line 53:

template

using __ComparisonFn = bool (*)(T, T);

template <typename T, __ComparisonFn __F>

inline void ComparisonImpl(

const ComparisonParams& op_params, const RuntimeShape& input1_shape,

const T* input1_data, const RuntimeShape& input2_shape,

const T* input2_data, const RuntimeShape& output_shape, bool* output_data) {

const int64_t flatsize =

MatchingFlatSize(input1_shape, input2_shape, output_shape);

for (int64_t i = 0; i < flatsize; ++i) {

output_data = __F(input1_data, input2_data);
}
}