Is it possible truncate a neural network weights?

When I am training a neural network I get the weights e.g. 0.960928653806898,0.273172876012661, ..., -0.413223736485805, but is possible modify the weights to obtain only the integer part and 2 digits to the fracctional part?

 채택된 답변

Greg Heath
Greg Heath 2014년 11월 4일
편집: Greg Heath 2014년 11월 6일

1 개 추천

Set the display format at the beginning of the program. It will not affect the accuracy of internal function calculations.
help format
doc format
e.g.,
a = 0.960928653806898; b=0.273172876012661; c=-0.413223736485805;
format short
a,b,c
%a = 0.96093
%b = 0.27317
%c = -0.41322
Hope this helps.
Thank you for formally accepting my answer
Greg

댓글 수: 1

Image Analyst
Image Analyst 2014년 11월 7일
편집: Image Analyst 2014년 11월 7일
Ana's answer moved here (It seems like Ana and Shana are the same person with two accounts):
Hi Greg, thank you for answer my question. At the beginning of the program I write "format compact" and with this command I visualize weights like: 0.9609,0.2731, ..., -0.4132. However, I know matlab weights are obtained randomly. But is possible truncate the randomly number using a function like round2 to obtain weights like 0.96,0.27, ..., -0.41?

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

질문:

2014년 11월 3일

편집:

2014년 11월 7일

Community Treasure Hunt

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

Start Hunting!

Translated by