2021-05-18 06:52 PM
2021-05-18 06:53 PM
I design a keras model as below,
###################################
model.add(layers.Dense(10, activation='relu', input_shape=(2,)))
model.add(Lambda(lambda x: x))
model.add(layers.Dense(3, activation='softmax'))
model.compile(optimizer=optimizers.RMSprop(lr=0.001), loss='categorical_crossentropy', metrics=['accuracy'])
########################################
After training, the '*.h5' file is created successfully and loaded into the cubemx.AI. But the error occurs while it be analyzed by AI tool.
[AI:network] Neural Network Tools for STM32AI v1.4.1 (STM.ai v6.0.0-RC6)
[AI:network] WARNING: Found a Lambda layer in Keras: conversion may fail.
[AI:network] INTERNAL ERROR: lambda/lambda/Identity is not in graph
But it should be OK as the help doc (STM32Cube/Repository/Packs/STMicroelectronics/X-CUBE-AI/6.0.0/Documentation/how_to_do_keras_lambda_custom.html) said.
2021-05-21 04:27 AM
Dear supporters, my task abort for the errors with lambda layers using cubemx.AI, then I sincerely hope you can help me,looking forward to your soonest reply.
Best
2022-01-25 03:48 AM
Did you figure out the solution ? @Swu.4