Пример #1
0
    def __init__(self, mc, gpu_id):
        with tf.device('/gpu:{}'.format(gpu_id)):
            ModelSkeleton.__init__(self, mc)

            self.BN = mc.BN
            self._add_forward_graph()
            self._add_yolo_interpret_graph()
Пример #2
0
 def __init__(self, gpu_id, params):
     with tf.device('/gpu:{}'.format(gpu_id)):
         ModelSkeleton.__init__(self, params)
         self._add_datagen_graph()
         self._add_forward_graph()
         self._add_loss_graph()
         self._add_train_graph()
Пример #3
0
 def __init__(self, mc, gpu_id=0):
     with tf.device('/gpu:{}'.format(gpu_id)):
         ModelSkeleton.__init__(self, mc)
         self._add_forward_graph()
         self._add_interpretation_graph()
         self._add_loss_graph()
         self._add_train_graph()
         self._add_viz_graph()
Пример #4
0
    def __init__(self, mc):
        with tf.device('/gpu:0'):
            ModelSkeleton.__init__(self, mc)

            self._add_forward_graph()
            self._add_interpretation_graph()
            self._add_loss_graph()
            self._add_train_graph()
            self._add_viz_graph()
Пример #5
0
 def __init__(self, mc, gpu_id=0):
   with tf.device('/gpu:{}'.format(gpu_id)):
     ModelSkeleton.__init__(self, mc)
     self._add_forward_graph()
     self._add_output_graph()
     self._add_loss_graph()
     self._add_train_graph()
     self._add_viz_graph()
     self._add_summary_ops()
Пример #6
0
 def __init__(self, mc, gpu_id=0):
   with tf.device('/gpu:{}'.format(gpu_id)):
     print ('SSDNet __init__')
     ModelSkeleton.__init__(self, mc)
     self.init()
     self.add_forward_graph()
     self.add_interpretation_graph()
     self.add_loss_graph()
     self.add_train_graph()
Пример #7
0
 def __init__(self, mc, gpu_id=0):
     with tf.device('/gpu:{}'.format(gpu_id)):
         #with tf.device('/cpu:{}'.format(0)):
         print('SSDNet __init__')
         ModelSkeleton.__init__(self, mc)
         self.mutibox_loss_layer = MutiBoxLossLayer(mc)
         self.add_forward_graph()
         self.add_interpretation_graph()
         self.add_loss_graph()
         self.add_train_graph()
Пример #8
0
  def __init__(self, mc, gpu_id=0):
    with tf.device('/gpu:{}'.format(gpu_id)):
      ModelSkeleton.__init__(self, mc)

      self._add_forward_graph()   # ed:  SqueezeNet Model
      self._add_output_graph()    #      pred_prob, pred_cls
      self._add_loss_graph()      #      cls_loss, total_loss
      self._add_train_graph()     #
      self._add_viz_graph()       #      label_to_show, depth_image_to_show, pred_image_to_show
      self._add_summary_ops()     #
Пример #9
0
  def __init__(self, mc, gpu_id=0):
    with tf.device('/gpu:{}'.format(gpu_id)):
      print("Squeezeseg: Init")
      print("Batch: ", mc.BATCH_SIZE)
      ModelSkeleton.__init__(self, mc)

      print("Adding forward graph")
      self._add_forward_graph()
      self._add_output_graph()
      self._add_loss_graph()
      self._add_train_graph()
      self._add_viz_graph()
      self._add_summary_ops()
      print("Complete")
Пример #10
0
 def __init__(self, mc, gpu_id_1=0, gpu_id_2=1, gpu_id_3=2):
     # Distribute the tensors to gpus vertically
     with tf.device('/gpu:{}'.format(gpu_id_1)):
         ModelSkeleton.__init__(self, mc)
         self._add_forward_graph_1()
     with tf.device('/gpu:{}'.format(gpu_id_2)):
         self._add_forward_graph_2()
     with tf.device('/gpu:{}'.format(gpu_id_3)):
         self._add_forward_graph_3()
         self._add_output_graph()
         self._add_loss_graph()
         self._add_train_graph()
         self._add_viz_graph()
         self._add_summary_ops()
Пример #11
0
    def __init__(self, mc, gpu_id):
        with tf.device('/gpu:{}'.format(gpu_id)):
            ModelSkeleton.__init__(self, mc)

            self._add_forward_graph()
            self._add_interpretation_graph()
            assert mc.LOSS_TYPE in ['SQT', 'YOLO'], \
                'Loss type {0} not defined'.format(mc.LOSS_TYPE)
            if mc.LOSS_TYPE == 'SQT':
                self._add_sqt_loss_graph()
            elif mc.LOSS_TYPE == 'YOLO':
                self._add_yolo_loss_graph()
            self._add_train_graph()
            self._add_viz_graph()
Пример #12
0
    def __init__(self, mc, gpu_id=0):
        if gpu_id < 0:
            device_set = '/cpu:{}'.format(0)
        else:
            device_set = '/gpu:{}'.format(gpu_id)
            print('device set ' + device_set)
        #with tf.device('/gpu:{}'.format(gpu_id)):
        with tf.device(device_set):
            ModelSkeleton.__init__(self, mc)

            self._add_forward_graph()
            self._add_interpretation_graph()
            self._add_loss_graph()
            self._add_train_graph()
            self._add_viz_graph()
Пример #13
0
    def __init__(self, mc, gpu_id):
        with tf.device('/gpu:{}'.format(gpu_id)):
            ModelSkeleton.__init__(self, mc)

            self._add_forward_graph()
            self._add_filter_loss_graph()
            self._add_train_graph()
            self._add_viz_graph()

            self.mask_pred = tf.placeholder(tf.float32,
                                            [mc.BATCH_SIZE, 12, 39, 1],
                                            name='mask_pred')
            self.mask_pred_viz_op = tf.summary.image(
                'pred_masks',
                self.mask_pred,
                collections='image_summary',
                max_outputs=mc.BATCH_SIZE)

            tf.summary.histogram('preds_hist', self.preds)
Пример #14
0
 def __init__(self, gpu_id):
     with tf.device('/gpu:{}'.format(gpu_id)):
         ModelSkeleton.__init__(self, 50, 28, 28)
         self._add_forward_graph()
         self._add_loss_graph()
         self._add_train_graph()
  def __init__(self, mc, gpu_id=0):
    with tf.device('/gpu:{}'.format(gpu_id)):
      ModelSkeleton.__init__(self, mc)

      self._add_forward_graph()