diff --git a/lanenet_model/lanenet.py b/lanenet_model/lanenet.py index 9822a0ee..17c4d506 100644 --- a/lanenet_model/lanenet.py +++ b/lanenet_model/lanenet.py @@ -97,42 +97,3 @@ def compute_loss(self, input_tensor, binary_label, instance_label, name): self._reuse = True return calculated_losses - - -if __name__ == '__main__': - """ - test code - """ - tusimple_dataset = lanenet_data_feed_pipline.LaneNetDataFeeder( - dataset_dir='/IMAGE_SCENE_SEGMENTATION/TUSIMPLE_DATASET/train_set/training', - flags='train' - ) - - test_in_tensor, test_binary_tensor, test_instance_tensor = tusimple_dataset.inputs(4, 1) - - train_model = LaneNet(phase='train', net_flag='vgg') - val_model = LaneNet(phase='val', net_flag='vgg', reuse=True) - - train_inference = train_model.inference(input_tensor=test_in_tensor, name='lanenet') - train_loss = train_model.compute_loss( - input_tensor=test_in_tensor, - binary_label=test_binary_tensor, - instance_label=test_instance_tensor, - name='lanenet' - ) - - val_inference = val_model.inference(input_tensor=test_in_tensor, name='lanenet') - val_loss = val_model.compute_loss( - input_tensor=test_in_tensor, - binary_label=test_binary_tensor, - instance_label=test_instance_tensor, - name='lanenet' - ) - - for vv in tf.global_variables(): - print(vv.name) - - print(train_inference) - - for layer_name, layer_info in train_loss.items(): - print('layer name: {:s} shape: {}'.format(layer_name, layer_info.get_shape().as_list()))