Call :func:`add_tensor_summary` under a reused 'activation-summary' name scope. This function is a no-op if not calling from main training tower. Args: x (tf.Tensor): the tensor to summary. types (list[str]): summary types, defaults to ``['sparsity', 'rms', 'histogram']
(x, types=None, name=None, collections=None)
| 138 | |
| 139 | |
| 140 | def add_activation_summary(x, types=None, name=None, collections=None): |
| 141 | """ |
| 142 | Call :func:`add_tensor_summary` under a reused 'activation-summary' name scope. |
| 143 | This function is a no-op if not calling from main training tower. |
| 144 | |
| 145 | Args: |
| 146 | x (tf.Tensor): the tensor to summary. |
| 147 | types (list[str]): summary types, defaults to ``['sparsity', 'rms', 'histogram']``. |
| 148 | name (str): if is None, use x.name. |
| 149 | collections (list[str]): collections of the summary ops. |
| 150 | """ |
| 151 | ndim = x.get_shape().ndims |
| 152 | if ndim < 2: |
| 153 | logger.warn("Cannot summarize scalar activation {}".format(x.name)) |
| 154 | return |
| 155 | if types is None: |
| 156 | types = ['sparsity', 'rms', 'histogram'] |
| 157 | with cached_name_scope('activation-summary'): |
| 158 | add_tensor_summary(x, types, name=name, collections=collections) |
| 159 | |
| 160 | |
| 161 | def add_param_summary(*summary_lists, **kwargs): |
nothing calls this directly
no test coverage detected