singa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [singa] nudles opened a new issue #698: Implement popular initialization methods
Date Sat, 16 May 2020 08:56:07 GMT

nudles opened a new issue #698:
URL: https://github.com/apache/singa/issues/698


   1. create a module initialization.py 
   2. add each initialization method as a function or class. e.g.,
   ```python
   class InitializationBase(object):
         def __init__(self, ):
             pass
         def call(self, x):
             pass
         def __call__(self, x):
             self.call(x)
   
   class Uniform(InitializationBase):
          def __init__(self, low=-1, high=1):
                  self.low = low
                  self.high = high
         def call(self, x):
                 x.uniform(self.low, self.high)
   
   def uniform(x, low=-1, high=1):
          x.uniform(low, high)
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message