454f620fce3e6fe2f87a91bffd74667d1f8a94f9,slm_lab/agent/net/convnet.py,ConvNet,__str__,#ConvNet#,182

Before Change



    def __str__(self):
        """Overriding so that print() will print the whole network"""
        s = self.conv_model.__str__() + "\n" + self.dense_model.__str__()
        for model_tail in self.model_tails:
            s += "\n" + model_tail.__str__()
        return s

    def update_lr(self):
        assert "lr" in self.optim_spec
        old_lr = self.optim_spec["lr"]

After Change


        self.lr_decay = getattr(net_util, self.lr_decay)

    def __str__(self):
        return super(ConvNet, self).__str__() + f"\noptim: {self.optim}"

    def get_conv_output_size(self):
        """Helper function to calculate the size of the flattened features after the final convolutional layer"""
        with torch.no_grad():
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 13

Instances


Project Name: kengz/SLM-Lab
Commit Name: 454f620fce3e6fe2f87a91bffd74667d1f8a94f9
Time: 2018-05-29
Author: kengzwl@gmail.com
File Name: slm_lab/agent/net/convnet.py
Class Name: ConvNet
Method Name: __str__


Project Name: kengz/SLM-Lab
Commit Name: 454f620fce3e6fe2f87a91bffd74667d1f8a94f9
Time: 2018-05-29
Author: kengzwl@gmail.com
File Name: slm_lab/agent/net/mlp.py
Class Name: HydraMLPNet
Method Name: __str__


Project Name: kengz/SLM-Lab
Commit Name: 454f620fce3e6fe2f87a91bffd74667d1f8a94f9
Time: 2018-05-29
Author: kengzwl@gmail.com
File Name: slm_lab/agent/net/recurrent.py
Class Name: RecurrentNet
Method Name: __str__