lib/model/train_val.py
def train_net(network, imdb, roidb, valroidb, output_dir, tb_dir,
              pretrained_model=None,
              max_iters=40000):
  """Train a Faster R-CNN network."""
  roidb = filter_roidb(roidb)
  valroidb = filter_roidb(valroidb)

  tfconfig = tf.ConfigProto(allow_soft_placement=True)
  tfconfig.gpu_options.allow_growth = True

  with tf.Session(config=tfconfig) as sess:
    sw = SolverWrapper(sess, network, imdb, roidb, valroidb, output_dir, tb_dir,
                       pretrained_model=pretrained_model)
    print('Solving...')
    sw.train_model(sess, max_iters)
    print('done solving')
Train a Faster R-CNN network.
Train a Faster R-CNN network.
Train a Faster R - CNN network .
def train_net(network, imdb, roidb, valroidb, output_dir, tb_dir,
              pretrained_model=None,
              max_iters=40000):
  roidb = filter_roidb(roidb)
  valroidb = filter_roidb(valroidb)
  tfconfig = tf.ConfigProto(allow_soft_placement=True)
  tfconfig.gpu_options.allow_growth = True
  with tf.Session(config=tfconfig) as sess:
    sw = SolverWrapper(sess, network, imdb, roidb, valroidb, output_dir, tb_dir,
                       pretrained_model=pretrained_model)
    print('Solving...')
    sw.train_model(sess, max_iters)
    print('done solving')
def train_net ( network , imdb , roidb , valroidb , output_dir , tb_dir , pretrained_model = None , max_iters = 40000 ) : roidb = filter_roidb ( roidb ) valroidb = filter_roidb ( valroidb ) tfconfig = tf . ConfigProto ( allow_soft_placement = True ) tfconfig . gpu_options . allow_growth = True with tf . Session ( config = tfconfig ) as sess : sw = SolverWrapper ( sess , network , imdb , roidb , valroidb , output_dir , tb_dir , pretrained_model = pretrained_model ) print ( 'Solving...' ) sw . train_model ( sess , max_iters ) print ( 'done solving' )
Train a Faster R-CNN network.
Train a Faster R - CNN network .
"""Train a Faster R-CNN network."""
network
imdb
roidb
valroidb
output_dir
tb_dir
pretrained_model
max_iters