22f37f9aa646e48ce0066da985e29837be9b72cb,tensorpack/graph_builder/utils.py,GradientPacker,compute_strategy,#GradientPacker#Any#,389

Before Change


            bool - False if grads cannot be packed due to various reasons.
        
        for g in grads:
            assert g.shape.is_fully_defined(), "Shape of {} is {}!".format(g.name, g.shape)

        self._shapes = [g.shape for g in grads]
        self._sizes = [g.shape.num_elements() for g in grads]
        self._total_size = sum(self._sizes)

After Change


            bool - False if grads cannot be packed due to various reasons.
        
        for g in grads:
            if not g.shape.is_fully_defined():
                logger.warn("Found gradient with incomplete shape: "
                            "{} has shape {}".format(g.name, g.shape))
                return False

        self._shapes = [g.shape for g in grads]
        self._sizes = [g.shape.num_elements() for g in grads]
        self._total_size = sum(self._sizes)
        if self._total_size / self._num_split < 1024:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: tensorpack/tensorpack
Commit Name: 22f37f9aa646e48ce0066da985e29837be9b72cb
Time: 2020-10-21
Author: ppwwyyxx@users.noreply.github.com
File Name: tensorpack/graph_builder/utils.py
Class Name: GradientPacker
Method Name: compute_strategy


Project Name: aleju/imgaug
Commit Name: bb749fe0ef40e0c792a0a8cbda28673efcef41c2
Time: 2019-09-21
Author: kontakt@ajung.name
File Name: imgaug/augmenters/size.py
Class Name: CropAndPad
Method Name: _draw_samples_image


Project Name: hanxiao/bert-as-service
Commit Name: 07318b6f193745c75467170413229f57893125c6
Time: 2019-03-13
Author: hanhxiao@tencent.com
File Name: server/bert_serving/server/helper.py
Class Name:
Method Name: check_tf_version


Project Name: ray-project/ray
Commit Name: a0f73cf3f72d02b5f47f4a189052171a3fdd85c3
Time: 2021-02-17
Author: krfricke@users.noreply.github.com
File Name: release/xgboost_tests/workloads/ft_small_elastic.py
Class Name:
Method Name: