1167a9006becd15490004c167ac8eab22521513a,theanolm/network/additionlayer.py,AdditionLayer,__init__,#AdditionLayer#Any#,17
Before Change
super().__init__(layer_options, *args, **kwargs)
input_size = self._input_layers[0].output_size
for input_layer in self._input_layers[1:]:
if input_layer.output_size != input_size:
raise ValueError("All inputs of an addition layer have to be "
"equal size.")
self.output_size = input_size
if "size" in layer_options:
if int(layer_options["size"]) != self.output_size:
raise ValueError("Addition layer cannot change the number of "
"features.")
self.output = None
def create_structure(self):
Creates the symbolic graph of this layer.
After Change
super().__init__(layer_options, *args, **kwargs)
for input_index, input_layer in enumerate(self._input_layers):
input_size = input_layer.output_size
if input_size != self.output_size:
param_name = "input{}/W".format(input_index)
self._init_weight(param_name, (input_size, self.output_size),
scale=0.01)
self.output = None
def create_structure(self):
Creates the symbolic graph of this layer.
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 9
Instances
Project Name: senarvi/theanolm
Commit Name: 1167a9006becd15490004c167ac8eab22521513a
Time: 2017-10-16
Author: seppo.git@marjaniemi.com
File Name: theanolm/network/additionlayer.py
Class Name: AdditionLayer
Method Name: __init__
Project Name: senarvi/theanolm
Commit Name: bcf723a2f67a372e6b03a453149a82ecf2766fff
Time: 2015-12-24
Author: seppo.git@marjaniemi.com
File Name: theanolm/network.py
Class Name: Architecture
Method Name: check_state
Project Name: biocore/scikit-bio
Commit Name: a32b6ba661206b12841e0a7cf8abb16ab0782f0a
Time: 2014-08-25
Author: jai.rideout@gmail.com
File Name: skbio/io/dm.py
Class Name:
Method Name: _dm_to_matrix