فهرست منبع

add some docs for remoteexpert forward

justheuristic 5 سال پیش
والد
کامیت
e050714f56
2فایلهای تغییر یافته به همراه2 افزوده شده و 0 حذف شده
  1. 1 0
      docs/modules/client.rst
  2. 1 0
      tesseract/client/remote_expert.py

+ 1 - 0
docs/modules/client.rst

@@ -12,6 +12,7 @@ tesseract.client
   <br><br>
 
 .. autoclass:: RemoteExpert
+   :members: forward
 
 .. autoclass:: GatingFunction
    :members:

+ 1 - 0
tesseract/client/remote_expert.py

@@ -25,6 +25,7 @@ class RemoteExpert(nn.Module):
         self._info = None
 
     def forward(self, *args, **kwargs):
+        """ Call RemoteExpert for the specified inputs and return its output(s). Compatible with pytorch.autograd. """
         assert len(kwargs) == len(self.info['keyword_names']), f"Keyword args should be {self.info['keyword_names']}"
         kwargs = {key: kwargs[key] for key in self.info['keyword_names']}
         # Note: we put keyword arguments in the same order as on a server to prevent f(a=1, b=2) != f(b=2, a=1) errors