tf.contrib.receptive_field.compute_receptive_field_from_graph_def
Computes receptive field (RF) parameters from a Graph or GraphDef object.
tf.contrib.receptive_field.compute_receptive_field_from_graph_def(
graph_def, input_node, output_node, stop_propagation=None, input_resolution=None
)
The algorithm stops the calculation of the receptive field whenever it
encounters an operation in the list stop_propagation
. Stopping the
calculation early can be useful to calculate the receptive field of a
subgraph such as a single branch of the
inception network.
Args |
graph_def
|
Graph or GraphDef object.
|
input_node
|
Name of the input node or Tensor object from graph.
|
output_node
|
Name of the output node or Tensor object from graph.
|
stop_propagation
|
List of operations or scope names for which to stop the
propagation of the receptive field.
|
input_resolution
|
2D list. If the input resolution to the model is fixed and
known, this may be set. This is helpful for cases where the RF parameters
vary depending on the input resolution (this happens since SAME padding in
tensorflow depends on input resolution in general). If this is None, it is
assumed that the input resolution is unknown, so some RF parameters may be
unknown (depending on the model architecture).
|
Returns |
rf_size_x
|
Receptive field size of network in the horizontal direction, with
respect to specified input and output.
|
rf_size_y
|
Receptive field size of network in the vertical direction, with
respect to specified input and output.
|
effective_stride_x
|
Effective stride of network in the horizontal direction,
with respect to specified input and output.
|
effective_stride_y
|
Effective stride of network in the vertical direction,
with respect to specified input and output.
|
effective_padding_x
|
Effective padding of network in the horizontal
direction, with respect to specified input and output.
|
effective_padding_y
|
Effective padding of network in the vertical
direction, with respect to specified input and output.
|
Raises |
ValueError
|
If network is not aligned or if either input or output nodes
cannot be found. For network criterion alignment, see
photos/vision/features/delf/g3doc/rf_computation.md
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-10-01 UTC.
[null,null,["Last updated 2020-10-01 UTC."],[],[]]