cancel
Showing results for 
Search instead for 
Did you mean: 

I get errors of the mode with lambda layers using cubemx.AI

Swu.4
Associate II
 
3 REPLIES 3
Swu.4
Associate II

 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.  

Swu.4
Associate II

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

rickforescue
Associate III

Did you figure out the solution ? @Swu.4​