(self, shape, parallelism)
return num_dev * int(np.prod(shape))
Computes the backend specific size needed for an iobuf with a specified
        shape that is meant to be shared between layers.

        Arguments:
            shape (tuple): Requested iobuf shape
            parallelism (string): Parallelism of layer requesting this iobuf

        Returns:
            int: Size of required iobuf
Computes the backend specific size needed for an iobuf with a specified
        shape that is meant to be shared between layers.
Computes the backend specific size needed for an iobuf with a specified shape that is meant to be shared between layers .
def shared_iobuf_size(self, shape, parallelism):
        """
        Computes the backend specific size needed for an iobuf with a specified
        shape that is meant to be shared between layers.

        Arguments:
            shape (tuple): Requested iobuf shape
            parallelism (string): Parallelism of layer requesting this iobuf

        Returns:
            int: Size of required iobuf
        """
        num_dev = 1 if parallelism in ('Data', 'Model') else getattr(self, 'num_dev', 1)
        return num_dev * int(np.prod(shape))
def shared_iobuf_size ( self , shape , parallelism ) : num_dev = 1 if parallelism in ( 'Data' , 'Model' ) else getattr ( self , 'num_dev' , 1 ) return num_dev * int ( np . prod ( shape ) )