SparkFun Forums 

Where electronics enthusiasts find answers.

Topics pertaining to the Arduino Core & software used with the Artemis module and Artemis development boards.
User avatar
By hugoleon00
#223983
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!
User avatar
By TS-Russell
#224311
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!
User avatar
By KMY10808
#226484
hugoleon00 wrote: Fri Mar 12, 2021 9:04 pm 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!


Did you ever mange to get it working I've been having the same problems
User avatar
By dagreen
#228728
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 <typename T>
using __ComparisonFn = bool (*)(T, T);

template <typename T, __ComparisonFn<T> __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);
}
}
 Topic permissions

You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum