View source on GitHub |
Transform to be applied to "Add"+ "ReLU" Graph.
Inherits From: LayerReLUQuantize
, Transform
This transform disables Quantization between Add and ReLU to ensure FQ does not get placed between them.
Methods
custom_objects
custom_objects()
Dictionary of custom objects introduced by the replacement
function.
A Transform
may introduce custom Classes and types unknown to Keras. This
function should return a dictionary containing these objects in case such
types are introduced. It allows model construction to serialize/deserialize
these objects.
Returns | |
---|---|
Custom objects introduced by the transform as a dictionary. |
pattern
pattern()
Return the LayerPattern
to find in the model graph.
replacement
replacement(
match_layer
)
Generate a replacement sub-graph for the matched sub-graph.
The fundamental constraint of the replacement is that the replacement sub-graph should consume the same input tensors as the original sub-graph and also produce a final list of tensors which are same in number and shape as the original sub-graph. Not following this could crash model creation, or introduce bugs in the new model graph.
sub-graph, and output layers feeding from the tip of the tree as parameters. These would be needed for complex replace cases.
Args | |
---|---|
match_layer
|
Matched sub-graph based on self.pattern() .
|