Skip to content

sacred config for faster rcnn #1358

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 25 commits into from
Jul 8, 2020
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
logger fix
  • Loading branch information
Jerryzcn committed Jun 17, 2020
commit f56bd79ae1c145886fcbef621c1a29830b0a2506
10 changes: 5 additions & 5 deletions gluoncv/pipelines/estimators/rcnn/faster_rcnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def _get_dataset(dataset, args):
return train_dataset, val_dataset, val_metric


class FasterRCNNEstimator():
class FasterRCNNEstimator:
""" Estimator for Faster R-CNN.
TODO: use base estimators.
"""
Expand Down Expand Up @@ -236,18 +236,18 @@ def __init__(self, config, logger=None):
param.initialize()
self.net.collect_params().reset_ctx(self.ctx)
# set up logger
logger.setLevel(logging.INFO)
self._logger.setLevel(logging.INFO)
log_file_path = self._cfg.save_prefix + '_train.log'
log_dir = os.path.dirname(log_file_path)
if log_dir and not os.path.exists(log_dir):
os.makedirs(log_dir)
fh = logging.FileHandler(log_file_path)
logger.addHandler(fh)
self._logger.addHandler(fh)
if self._cfg.custom_model:
logger.info(
self._logger.info(
'Custom model enabled. Expert Only!! Currently non-FPN model is not supported!!'
' Default setting is for MS-COCO.')
logger.info(self._cfg)
self._logger.info(self._cfg)
self.rpn_cls_loss = gluon.loss.SigmoidBinaryCrossEntropyLoss(from_sigmoid=False)
self.rpn_box_loss = gluon.loss.HuberLoss(rho=self._cfg.rpn_smoothl1_rho) # == smoothl1
self.rcnn_cls_loss = gluon.loss.SoftmaxCrossEntropyLoss()
Expand Down