mirror of https://github.com/open-mmlab/mmcv.git
[Docs] Correct mistakes of examples (#2120)
parent
f4167fe1e3
commit
75ae200954
|
@ -195,8 +195,8 @@ disk_backend = HardDiskBackend()
|
||||||
with io.BytesIO(disk_backend.get(filepath1)) as buffer:
|
with io.BytesIO(disk_backend.get(filepath1)) as buffer:
|
||||||
checkpoint = torch.load(buffer)
|
checkpoint = torch.load(buffer)
|
||||||
with io.BytesIO() as buffer:
|
with io.BytesIO() as buffer:
|
||||||
torch.save(checkpoint, f)
|
torch.save(checkpoint, buffer)
|
||||||
disk_backend.put(f.getvalue(), filepath2)
|
disk_backend.put(buffer.getvalue(), filepath2)
|
||||||
```
|
```
|
||||||
|
|
||||||
If we want to implement an interface which automatically select the corresponding
|
If we want to implement an interface which automatically select the corresponding
|
||||||
|
|
Loading…
Reference in New Issue