mirror of https://github.com/open-mmlab/mmcv.git
support pytorch 1.0
parent
a097c65fbf
commit
076cdd6c74
|
@ -54,7 +54,7 @@ def imfrombytes(content, flag='color'):
|
|||
Returns:
|
||||
ndarray: Loaded image array.
|
||||
"""
|
||||
img_np = np.fromstring(content, np.uint8)
|
||||
img_np = np.frombuffer(content, np.uint8)
|
||||
flag = imread_flags[flag] if is_str(flag) else flag
|
||||
img = cv2.imdecode(img_np, flag)
|
||||
return img
|
||||
|
|
|
@ -33,7 +33,7 @@ class MMDistributedDataParallel(nn.Module):
|
|||
self._dist_broadcast_coalesced(module_states,
|
||||
self.broadcast_bucket_size)
|
||||
if self.broadcast_buffers:
|
||||
buffers = [b.data for b in self.module._all_buffers()]
|
||||
buffers = [b.data for b in self.module.buffers()]
|
||||
if len(buffers) > 0:
|
||||
self._dist_broadcast_coalesced(buffers,
|
||||
self.broadcast_bucket_size)
|
||||
|
|
|
@ -13,7 +13,7 @@ def get_host_info():
|
|||
|
||||
|
||||
def get_dist_info():
|
||||
if dist._initialized:
|
||||
if dist.is_initialized():
|
||||
rank = dist.get_rank()
|
||||
world_size = dist.get_world_size()
|
||||
else:
|
||||
|
|
|
@ -1 +1 @@
|
|||
__version__ = '0.2.0'
|
||||
__version__ = '0.2.2'
|
||||
|
|
Loading…
Reference in New Issue