Create a convolution filter variable with the specified name and shape, and initialize it using Xavier initialition.
(name, shape)
| 5 | |
| 6 | |
| 7 | def create_variable(name, shape): |
| 8 | '''Create a convolution filter variable with the specified name and shape, |
| 9 | and initialize it using Xavier initialition.''' |
| 10 | initializer = tf.contrib.layers.xavier_initializer_conv2d() |
| 11 | variable = tf.Variable(initializer(shape=shape), name=name) |
| 12 | return variable |
| 13 | |
| 14 | |
| 15 | def create_embedding_table(name, shape): |
no outgoing calls
no test coverage detected