Skip to content

Commit a20ddf2

Browse files
MatthijsBurghreinzor
authored andcommitted
fixes #65, ignore '-s' argument of rqt
1 parent 8f1972f commit a20ddf2

File tree

1 file changed

+6
-1
lines changed
  • image_recognition_tensorflow/src/image_recognition_tensorflow

1 file changed

+6
-1
lines changed

image_recognition_tensorflow/src/image_recognition_tensorflow/retrain.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from __future__ import print_function
66

77
import os
8+
import sys
89
from argparse import Namespace
910

1011
import errno
@@ -45,4 +46,8 @@ def main(image_dir, model_dir, output_dir, steps, batch, architecture="inception
4546
tf.app.flags.FLAGS.random_scale = random_scale
4647
tf.app.flags.FLAGS.random_brightness = random_brightness
4748

48-
tf_main('')
49+
# Do not pass on the '-s' argument of rqt
50+
if "rqt" in sys.argv[0]:
51+
sys.argv.pop(1)
52+
53+
tf_main('')

0 commit comments

Comments
 (0)