Skip to content

Commit

Permalink
cache clear update
Browse files Browse the repository at this point in the history
  • Loading branch information
chrischoy committed May 20, 2020
1 parent 966a3e3 commit 4afee29
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@

This repository contains the accompanying code for [4D-SpatioTemporal ConvNets: Minkowski Convolutional Neural Networks, CVPR'19](https://arxiv.org/abs/1904.08755).

## Change Logs
## Change Log

- 2020-05-19 The latest Minkowski Engine since the commit [be5c3](https://github.com/StanfordVL/MinkowskiEngine/commit/be5c3c18b26d6a62380d613533b7a939a5458705), does not require explicit cache clear and can use the memory more efficiently.
- 2020-05-04: As pointed out by Thomas Chaton on [Issue#30](https://github.com/chrischoy/SpatioTemporalSegmentation/issues/30), I also found out that the training script contains bugs that models cannot reach the target performance described in the Model Zoo with the latest MinkowskiEngine. I am in the process of debugging the bugs, but I am having some difficulty finding the bugs. So, I created another git repo [SpatioTemporalSegmentation-ScanNet](https://github.com/chrischoy/SpatioTemporalSegmentation-ScanNet) from my other private repo that reaches the target performance. Please refer to the [SpatioTemporalSegmentation-ScanNet](https://github.com/chrischoy/SpatioTemporalSegmentation-ScanNet) for the ScanNet training. I'll update this repo once I find the bugs and merge SpatioTemporalSegmentation-ScanNet with this repo. Sorry for the trouble.

## Requirements
Expand Down
6 changes: 1 addition & 5 deletions lib/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def train(model, data_loader, val_data_loader, config, transform_data_fn=None):
# Preprocess input
color = input[:, :3].int()
if config.normalize_color:
input[:, 1:] = input[:, 1:] / 255. - 0.5
input[:, :3] = input[:, :3] / 255. - 0.5
sinput = SparseTensor(input, coords).to(device)

data_time += data_timer.toc(False)
Expand Down Expand Up @@ -150,10 +150,6 @@ def train(model, data_loader, val_data_loader, config, transform_data_fn=None):
# Recover back
model.train()

if curr_iter % config.empty_cache_freq == 0:
# Clear cache
torch.cuda.empty_cache()

# End of iteration
curr_iter += 1

Expand Down

0 comments on commit 4afee29

Please sign in to comment.