93571306c37de65eaecbf79fa77b75bfb0b1f68b,rl_coach/architectures/tensorflow_components/middlewares/middleware.py,Middleware,__init__,#Middleware#,31

Before Change


        if isinstance(self.scheme, MiddlewareScheme):
            self.layers_params = copy.copy(self.schemes[self.scheme])
        else:
            self.layers_params = copy.copy(self.scheme)

        // we allow adding batchnorm, dropout or activation functions after each layer.
        // The motivation is to simplify the transition between a network with batchnorm and a network without
        // batchnorm to a single flag (the same applies to activation function and dropout)

After Change


        else:
            // if scheme is specified directly, convert to TF layer if it"s not a callable object
            // NOTE: if layer object is callable, it must return a TF tensor when invoked
            self.layers_params = [convert_layer(l) for l in copy.copy(self.scheme)]

        // we allow adding batchnorm, dropout or activation functions after each layer.
        // The motivation is to simplify the transition between a network with batchnorm and a network without
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: NervanaSystems/coach
Commit Name: 93571306c37de65eaecbf79fa77b75bfb0b1f68b
Time: 2018-11-06
Author: sina.beh@gmail.com
File Name: rl_coach/architectures/tensorflow_components/middlewares/middleware.py
Class Name: Middleware
Method Name: __init__


Project Name: NervanaSystems/coach
Commit Name: 93571306c37de65eaecbf79fa77b75bfb0b1f68b
Time: 2018-11-06
Author: sina.beh@gmail.com
File Name: rl_coach/architectures/tensorflow_components/embedders/embedder.py
Class Name: InputEmbedder
Method Name: __init__


Project Name: ray-project/ray
Commit Name: 353d7e107f2b0b6c973ac6def0ba2199157d2f6d
Time: 2020-03-29
Author: xmo@berkeley.edu
File Name: python/ray/serve/queues.py
Class Name: Query
Method Name: ray_serialize