Skip to main content
Swu.4
Associate
May 19, 2021
Question

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

  • May 19, 2021
  • 3 replies
  • 1238 views

..

This topic has been closed for replies.

3 replies

Swu.4
Swu.4Author
Associate
May 19, 2021

 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
Swu.4Author
Associate
May 21, 2021

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 II
January 25, 2022

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