You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.
Is it possible to scale the initial random values for the weights in PrettyTensor?
I have a network of a few convolutional layers followed by a few fully-connected layers. They all use relu-activations except for the last layer which is just linear output. I would like the initial output values of the network to be random and close to zero. I think the best way would be to init the random weights in the output-layer to be close to zero.
I see that there is a weights parameter to the fully_connected() class but it is not clear to me how to use it.
I see that while the documentation mentions that weights can take an initializer function, it doesn't specify that it is a standard tensorflow initializer (e.g. tf.constant_initializer, tf.random_uniform_initializer, etc.). Basically it is any function that has the signature: init(shape, dtype=tf.float32, partition_info=None). They are listed here (towards the bottom and not in any particular order): https://www.tensorflow.org/api_docs/python/state_ops/sharing_variables
Thanks. I think I got a little confused because I found the PrettyTensor initializers which need a shape parameter, which I obviously cannot provide. But tf.random_normal_initializer() and tf.truncated_normal_initializer() work fine. It might be a good idea to mention this in the docs.
Is it possible to scale the initial random values for the weights in PrettyTensor?
I have a network of a few convolutional layers followed by a few fully-connected layers. They all use relu-activations except for the last layer which is just linear output. I would like the initial output values of the network to be random and close to zero. I think the best way would be to init the random weights in the output-layer to be close to zero.
I see that there is a
weights
parameter to thefully_connected()
class but it is not clear to me how to use it.Could you give an example in this code? Thanks.
The text was updated successfully, but these errors were encountered: