Error when using globalAver​agePooling​2dLayer in CNN

조회 수: 1 (최근 30일)
Nour Mohamed
Nour Mohamed 2020년 9월 7일
답변: Madhav Thakker 2020년 9월 10일
I am writing a CNN code for an image classification problem and I want to use global average pooling. I found the globalAveragePooling2dLayer in this link: https://www.mathworks.com/help/deeplearning/ref/nnet.cnn.layer.globalaveragepooling2dlayer.html
However, when I try to use it within my Layers array, I get the following error:
Undefined function or variable 'globalAveragePooling2dLayer'.
Error in cnn_trial (line 64)
globalAveragePooling2dLayer
I have the Neural Networks toolbox and I have used the average pooling layer before. How can I fix this issue?
Thank you,
  댓글 수: 2
Mohammad Sami
Mohammad Sami 2020년 9월 7일
This layer is available from version R2019b and onwards. Which version are you using ?
Nour Mohamed
Nour Mohamed 2020년 9월 7일
I am using R2018a version. Do I have to uninstall it and install the newer version?

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

채택된 답변

Madhav Thakker
Madhav Thakker 2020년 9월 10일
Hi Nour,
The globalAveragePooling2dLayer was introduced in R2019b. As you are using R2018a, you are facing the Undefined function error.
You cannot use tools from a recent release in an older release. Either, you can upgrade to a new release or you can install the newer version alongside the your older R2018a version.
Hope this helps.

추가 답변 (0개)

카테고리

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