singa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [singa] nudles commented on a change in pull request #731: fix the bug of param name
Date Tue, 16 Jun 2020 05:10:32 GMT

nudles commented on a change in pull request #731:
URL: https://github.com/apache/singa/pull/731#discussion_r440589149



##########
File path: python/singa/layer.py
##########
@@ -499,7 +581,7 @@ def initialize(self, x):
             self.kernel_size[0],
             self.kernel_size[1],
         )
-        w_name = self.name + Layer.sep + 'W'
+        w_name = self.get_param_name('W')

Review comment:
       we should avoid this. it means we may a parameter  self.W whose name is set to "Weights".
 It is a bit confusing on the naming.

##########
File path: python/singa/layer.py
##########
@@ -158,6 +217,21 @@ def _get_unique_name(self):
             self.name = ''
         return self.name

Review comment:
       2. yes. it will set and then reset the names many times if the depths is large. the
advantage is that whenever the parent layer name is changed,all sub layers will be updated.
I am fine with both schemes. just need to add some docstring to state that the layer name
should not change/reset at runtime.  
   3. then just check based on the pattern? if it is like dummy+integer, then it means the
name is not set by users.




----------------------------------------------------------------
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