Commit aaf62f2d authored by Yuxin Wu's avatar Yuxin Wu

KeyboardInterrupt is not an Exception

parent 13e7f38f
......@@ -6,7 +6,7 @@ PLEASE always include the following:
1. What you did. (command you run if using examples; post or describe your code if not)
2. What you observed, e.g. logs.
3. What you expected, if not obvious.
4. Your environment (TF version, cudnn version, GPU model), if it matters.
4. Your environment (TF version, cudnn version, number & type of GPUs), if it matters.
Feature Requests:
1. Improve an existing feature.
......
......@@ -47,7 +47,7 @@ To evaluate the performance (pretrained models can be downloaded in [model zoo](
Mean Average Precision @IoU=0.50:0.95:
+ trainval35k/minival, FASTRCNN_BATCH=256: 34.2. Takes 49h on 8 TitanX.
+ trainval35k/minival, FASTRCNN_BATCH=64: 32.7. Takes 31h on 8 TitanX.
+ trainval35k/minival, FASTRCNN_BATCH=64: 33.0. Takes 22h on 8 P100.
The hyperparameters are not carefully tuned. You can probably get better performance by e.g. training longer.
......
......@@ -24,6 +24,8 @@ Usage:
python -m tensorpack.utils.loadcaffe \
PATH/TO/VGG/{VGG_ILSVRC_16_layers_deploy.prototxt,VGG_ILSVRC_16_layers.caffemodel} vgg16.npy
Or download a converted caffe model from http://models.tensorpack.com/caffe/
./load-vgg16.py --load vgg16.npy --input cat.png
"""
......
......@@ -134,8 +134,6 @@ class BatchData(ProxyDataFlow):
try:
result.append(
np.asarray([x[k] for x in data_holder], dtype=tp))
except KeyboardInterrupt:
raise
except Exception as e: # noqa
logger.exception("Cannot batch data. Perhaps they are of inconsistent shape?")
if isinstance(dt, np.ndarray):
......
......@@ -245,8 +245,6 @@ class ILSVRC12(ILSVRC12Files):
try:
ret.append(parse_bbox(fname))
cnt += 1
except KeyboardInterrupt:
raise
except Exception:
ret.append(None)
logger.info("{}/{} images have bounding box.".format(cnt, len(imglist)))
......
......@@ -28,8 +28,6 @@ class ExceptionHandler:
def catch(self):
try:
yield
except KeyboardInterrupt:
raise
except Exception:
self._nr_error += 1
if not self.catch_exceptions:
......
......@@ -225,7 +225,6 @@ class Trainer(object):
logger.info("Training was stopped.")
except KeyboardInterrupt:
logger.info("Detected Ctrl-C and exiting main loop.")
except Exception:
raise
finally:
self._callbacks.after_train()
......
......@@ -273,7 +273,6 @@ class Trainer(object):
logger.info("Training was stopped.")
except KeyboardInterrupt:
logger.info("Detected Ctrl-C and exiting main loop.")
except Exception:
raise
finally:
self._callbacks.after_train()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment