ec849adaf4ceb42ed52ca142c839f627c34b9434,slm_lab/agent/net/convnet.py,ConvNet,wrap_eval,#ConvNet#Any#,212

Before Change


        Completes one feedforward step, ensuring net is set to evaluation model returns: network output given input x
        """
        self.set_train_eval(train=False)
        outs = self(x)
        if type(outs) is list:
            outs = [o.data for o in outs]
        else:
            outs = outs.data
        return outs

    def init_params(self):
        """
        Initializes all of the model"s parameters using xavier uniform initialization.

After Change


        Completes one feedforward step, ensuring net is set to evaluation model returns: network output given input x
        """
        self.eval()
        return self(x)

    def __str__(self):
        """Overriding so that print() will print the whole network"""
        s = self.conv_model.__str__() + "\n" + self.dense_model.__str__()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: kengz/SLM-Lab
Commit Name: ec849adaf4ceb42ed52ca142c839f627c34b9434
Time: 2018-05-21
Author: kengzwl@gmail.com
File Name: slm_lab/agent/net/convnet.py
Class Name: ConvNet
Method Name: wrap_eval


Project Name: kengz/SLM-Lab
Commit Name: ec849adaf4ceb42ed52ca142c839f627c34b9434
Time: 2018-05-21
Author: kengzwl@gmail.com
File Name: slm_lab/agent/net/recurrent.py
Class Name: RecurrentNet
Method Name: wrap_eval


Project Name: dpressel/mead-baseline
Commit Name: 517c81db14d146a5e740ca5cca9177d9f9c30d8f
Time: 2019-11-15
Author: blester125@gmail.com
File Name: python/baseline/tf/tagger/model.py
Class Name: TaggerModelBase
Method Name: predict