Python torch.distributed._clear_group_cache() Examples

The following are 2 code examples of torch.distributed._clear_group_cache(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module torch.distributed , or try the search function .
Example #1
Source File: distributed_utils.py    From Actor-Critic-Based-Resource-Allocation-for-Multimodal-Optical-Networks with GNU General Public License v3.0 5 votes vote down vote up
def __init__(self, module):
        super(DistModule, self).__init__()
        self.module = module
        broadcast_params(self.module)
        dist._clear_group_cache() 
Example #2
Source File: distributed_utils.py    From Actor-Critic-Based-Resource-Allocation-for-Multimodal-Optical-Networks with GNU General Public License v3.0 5 votes vote down vote up
def train(self, mode=True):
        dist._clear_group_cache()
        super(DistModule, self).train(mode)
        self.module.train(mode)