def serialize(self): """Serializes the layer for use with the transformer server. """ serialized = transformer_pb.Layer() serialized.maxpool_data.window_data.CopyFrom( self.window_data.serialize()) return serialized
def serialize(self): """Serializes the layer for the transformer server. """ serialized = transformer_pb.Layer() serialized.concat_data.layers.extend( [input_layer.serialize() for input_layer in self.input_layers]) serialized.concat_data.concat_along = self.concat_along.serialize() return serialized
def serialize(self): """Serializes the layer for use with the transformer server. """ serialized = transformer_pb.Layer() serialized.fullyconnected_data.weights.extend( list(self.weights.numpy().flatten())) serialized.fullyconnected_data.biases.extend( list(self.biases.numpy().flatten())) return serialized
def serialize(self): """Serializes the layer for use with the transformer server. """ serialized = transformer_pb.Layer() serialized.normalize_data.means.extend( list(self.means.numpy().flatten())) serialized.normalize_data.standard_deviations.extend( list(self.standard_deviations.numpy().flatten())) return serialized
def serialize(self): """Serializes the layer for use with the transformer server. """ serialized = transformer_pb.Layer() filters = self.filter_weights.numpy() biases = self.biases.numpy() conv2d_data = serialized.conv2d_data conv2d_data.window_data.CopyFrom(self.window_data.serialize()) conv2d_data.filters.extend(list(filters.flatten())) serialized.conv2d_data.biases.extend(list(biases.flatten())) return serialized
def serialize(self): """Serializes the layer for use with the transformer server. """ serialized = transformer_pb.Layer() serialized.hard_tanh_data.SetInParent() return serialized
def serialize(self): """Serializes the layer for the transformer server. """ serialized = transformer_pb.Layer() serialized.argmax_data.SetInParent() return serialized