필터 지우기
필터 지우기

How to import Keras layers for regression?

조회 수: 3 (최근 30일)
Renita Raidoo
Renita Raidoo 2020년 6월 19일
답변: Sivylla Paraskevopoulou 2022년 5월 9일
Hi all. I am playing around with importing Keras layers for an LSTM problem but can't seem to get even a basic fully connected single layer network to work. Even though my Keras model just has a basic input layer, Matlab reads it as an "ImageInputLayer". This is for a simple sequence-to-sequence regression problem. I just want to feed in a 2D matrix with multiple features and a series of timesteps but it expects a 3D image tensor. Is there something wrong with the Keras model or do I need to preprocess my data differently? Thanks in advance!
  댓글 수: 2
Friedrich Seiffarth
Friedrich Seiffarth 2020년 8월 24일
Did you find a solution for your problem ? Because I am running into the same problem.
Divya Gaddipati
Divya Gaddipati 2020년 9월 1일
Could you mention the error you are getting?

댓글을 달려면 로그인하십시오.

답변 (1개)

Sivylla Paraskevopoulou
Sivylla Paraskevopoulou 2022년 5월 9일
Since R2020b, Deep Learning Toolbox provides the featureInputLayer layer, and since R2021a you can import the TensorFlow-Keras layer Input as a featureInputLayer. For a complete list, see TensorFlow-Keras Layers Supported for Conversion into Built-In MATLAB Layers.
The importTensorFlowNetwork function tries to append an output layer to the imported network by interpreting the loss function of the TensorFlow model. If your model doesn't specify a loss function, specify the OutputLayerType name-value argument of importTensorFlowNetwork as "regression".

카테고리

Help CenterFile Exchange에서 Image Data Workflows에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by