MCPcopy Create free account
hub / github.com/apache/singa / __init__

Method __init__

python/singa/layer.py:371–396  ·  view source on GitHub ↗

Args: nb_kernels: int, the channel of output, also is the number of filters alpha (float): Scalar multiplier for the product of input tensors A * B. beta (float): Scalar multiplier for input tensor C. ransA (bool): Whether A sh

(self,
                 nb_kernels,
                 alpha=1.0,
                 beta=1.0,
                 transA=False,
                 transB=True,
                 bias=True,
                 bias_shape=None)

Source from the content-addressed store, hash-verified

369 """
370
371 def __init__(self,
372 nb_kernels,
373 alpha=1.0,
374 beta=1.0,
375 transA=False,
376 transB=True,
377 bias=True,
378 bias_shape=None):
379 """
380 Args:
381 nb_kernels: int, the channel of output, also is the number of
382 filters
383 alpha (float): Scalar multiplier for the product of input tensors A * B.
384 beta (float): Scalar multiplier for input tensor C.
385 ransA (bool): Whether A should be transposed
386 transB (bool): Whether B should be transposed
387 bias: bool
388 """
389 super(Gemm, self).__init__()
390 self.nb_kernels = nb_kernels
391 self.alpha = alpha
392 self.beta = beta
393 self.transA = 1 if transA else 0
394 self.transB = 1 if transB else 0
395 self.bias = bias
396 self.bias_shape = bias_shape
397
398 def initialize(self, x):
399 if self.transA == 0:

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected