7a65d9993bdda4a5248f6aa313abf687faa031a6,hypergan/configurable_component.py,ConfigurableComponent,layer_linear,#ConfigurableComponent#Any#Any#Any#,334
Before Change
nn.Linear(options.input_size or self.current_input_size, output_size, bias=bias)
]
self.nn_init(layers[0], options.initializer)
if len(shape) == 3:
self.current_channels = shape[2]
self.current_width = shape[0]
self.current_height = shape[1]
layers.append(Reshape(self.current_channels, self.current_height, self.current_width))
if len(shape) == 2:
self.current_channels = shape[1]
self.current_width = 1
self.current_height = shape[0]
After Change
for dim in shape:
output_size *= dim
layers = []
if len(self.current_size.dims) != 1:
layers += [nn.Flatten()]
layers += [nn.Linear(options.input_size or self.current_size.size(), output_size, bias=bias)]
self.nn_init(layers[0], options.initializer)
self.current_size = LayerSize(*reversed(shape))
if len(shape) != 1:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances Project Name: HyperGAN/HyperGAN
Commit Name: 7a65d9993bdda4a5248f6aa313abf687faa031a6
Time: 2020-06-27
Author: martyn@255bits.com
File Name: hypergan/configurable_component.py
Class Name: ConfigurableComponent
Method Name: layer_linear
Project Name: keras-team/autokeras
Commit Name: b1bfd16945a658d02847209e46a2ba8d72b456e1
Time: 2019-07-01
Author: jhfjhfj1@gmail.com
File Name: autokeras/hypermodel/hyper_head.py
Class Name: ClassificationHead
Method Name: build