0
$\begingroup$

I am trying to construct a neural network, which i have previously trained in keras, in another program. Therefore, i use the get.weights command from keras to acces the weights. Now the problem is, that the results from the other program seem horrible so I am trying to figure out why.

Keras tells me, that the format of the weight is float32 and all the weights have a format looking like "5.30527434e-01" - which leads me to the conclusion, that keras is rounding the number. Is that correct?

And if it is, is there a way to access the full weights of the network?

$\endgroup$
  • $\begingroup$ Please explain how you see rounding in this value and what you mean by "full weights." It looks like you might be confounding two senses of "format," by the way: "float32" apparently means an IEEE 32-bit floating point internal representation, while your second use of "format" seems to refer to a decimal representation used to display the number. If anything, the number as displayed is more precise than its internal representation! $\endgroup$ – whuber Sep 24 '18 at 23:07
1
$\begingroup$

Get weights does give you the full weights. There is no reason why they would round them up, typically the size of a network is not the bottleneck, training speed is.

$\endgroup$
  • $\begingroup$ I found my mistake. I printed the weights with the python "print()" command. That was the point where the weights got rounded. $\endgroup$ – Philipps Sep 26 '18 at 16:31

Not the answer you're looking for? Browse other questions tagged or ask your own question.