b49758be2bc75c281ce937ffa40fb13228dc38d5,dlpy/network.py,Network,compile,#Network#,108

Before Change


            if layer.type == "block":
                // TODO support block
                DLPyError("Block is not supported in network")
            if layer.type == "transconvo":
                layer.calculate_output_padding()
                del layer.config["output_size"]
            option = layer.to_model_params()
            rt = self._retrieve_("deeplearn.addlayer", model = self.model_name, **option)
            if rt.severity > 1:
                raise DLPyError("there seems to be an error while adding the " + layer.name + ".")

After Change


            rt = self._retrieve_("deeplearn.addlayer", model = self.model_name, **option)
            if rt.severity > 1:
                raise DLPyError("there seems to be an error while adding the " + layer.name + ".")
        self.num_params = self.count_params()
        print("NOTE: Model compiled successfully.")

    def _retrieve_(self, _name_, message_level="error", **kwargs):
        """ Call a CAS action """
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: sassoftware/python-dlpy
Commit Name: b49758be2bc75c281ce937ffa40fb13228dc38d5
Time: 2019-01-09
Author: 34170572+wenyushi@users.noreply.github.com
File Name: dlpy/network.py
Class Name: Network
Method Name: compile


Project Name: keras-team/keras
Commit Name: cab77c8f23bf81eaa06aeeeb28a4da3b716f7bd7
Time: 2017-10-25
Author: julien.rebetez@gmail.com
File Name: keras/utils/layer_utils.py
Class Name:
Method Name: print_summary


Project Name: osmr/imgclsmob
Commit Name: abfee6caf1ffc5ed743565984569346acae6ca4e
Time: 2018-09-22
Author: osemery@gmail.com
File Name: keras_/models/resnet.py
Class Name:
Method Name: _test