I created a simple topology with an input layer, and 2 dense hidden layers. There are 10 inputs and 10 neurons for each hidden layer.
I would have expected each hidden layer to have 10x10 weights/synapses, but it seems that the first hidden layer only has 1x10 weights:
features = {"test_input" : tensorflow.range(10)}
feature_columns = [tensorflow.feature_column.numeric_column("test_input")]
input_layer = tensorflow.feature_column.input_layer(
features=features,
feature_columns=feature_columns)
hidden_layer_1 = tensorflow.layers.dense(
input_layer,
units=10,
activation=tensorflow.nn.relu,
name="hidden_layer_1")
hidden_layer_2 = tensorflow.layers.dense(
hidden_layer_1,
units=10,
activation=tensorflow.nn.relu,
name="hidden_layer_2")
vars = tensorflow.trainable_variables()
print vars
It seems like the first hidden layer only connects each neuron to a single corresponding input, rather than densely connecting to each input for each neuron. Is this expected? Where is this behaviour documented?