9bc2e60fd587389701c077f5bbff69250d6fb0b1,keras/callbacks.py,TensorBoard,_set_model,#TensorBoard#Any#,464

Before Change


            layers = self.model.layers
            for layer in layers:
                if hasattr(layer, "W"):
                    tf.histogram_summary("{}_W".format(layer.name), layer.W)
                if hasattr(layer, "b"):
                    tf.histogram_summary("{}_b".format(layer.name), layer.b)
                if hasattr(layer, "output"):

After Change


                for weight in layer.weights:
                    tf.histogram_summary(weight.name, weight)

                    if self.write_images:
                        w_img = tf.squeeze(weight)

                        shape = w_img.get_shape()
                        if len(shape) > 1 and shape[0] > shape[1]:
                            w_img = tf.transpose(w_img)

                        if len(shape) == 1:
                            w_img = tf.expand_dims(w_img, 0)

                        w_img = tf.expand_dims(tf.expand_dims(w_img, 0), -1)

                        tf.image_summary(weight.name, w_img)

                if hasattr(layer, "output"):
                    tf.histogram_summary("{}_out".format(layer.name),
                                         layer.output)
        self.merged = tf.merge_all_summaries()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: keras-team/keras
Commit Name: 9bc2e60fd587389701c077f5bbff69250d6fb0b1
Time: 2016-09-07
Author: kuza55@gmail.com
File Name: keras/callbacks.py
Class Name: TensorBoard
Method Name: _set_model


Project Name: deepmind/sonnet
Commit Name: 62386f9bdb92662267f18fcf766c84ef6d0e7124
Time: 2018-07-17
Author: noreply@google.com
File Name: sonnet/python/modules/conv.py
Class Name: _ConvND
Method Name: _apply_mask


Project Name: NifTK/NiftyNet
Commit Name: 5e8a0c73031db807c0e41ec8bc75f37d6e1b7d30
Time: 2017-05-07
Author: wenqi.li@ucl.ac.uk
File Name: layer/convolution.py
Class Name: ConvBNLayer
Method Name: layer_op