配列の正規化について
조회 수: 1 (최근 30일)
이전 댓글 표시
채택된 답변
Kenta
2020년 7월 22일
datavarsというところを'ResponseImage'としてはどうでしょう?
댓글 수: 6
Kenta
2020년 7월 22일
clear;clc
load patchesRead1
% N = normalize(patchesRead1,'DataVariables','ResponseImage');
B = cellfun(@myL2norm,patchesRead1.ResponseImage,'UniformOutput',false);
function output=myL2norm(input)
output=normalize(single(input),'norm');
end
データの方添付していただきありがとうございます。patchesRead1.ResponseImageという変数がセル配列で入っているので、セル配列の変数に対して、そのセルの中を対象に指定した関数を実行するcellfunというものがあります。それを使うと上のようにして、L2 normで正規化した値を返します。
ただ、深層学習に利用したいとなると、もともと、深層学習の入力層で正規化方法を指定できるのであまりこの操作は必要ないかもしれません。
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 イメージ算術에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!