Skip to content

Commit 4a92e28

Browse files
Merge pull request #275 from JdeRobot/issue-274
General app refactor
2 parents 8c3b4b0 + dd320e6 commit 4a92e28

20 files changed

+171
-178
lines changed

behavior_metrics/analyze_bag.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,17 @@
6060
data = json.loads(h)
6161
metadata = json.loads(data['data'])
6262

63-
for topic, point, t in bag.read_messages(topics=['/lap_stats']):
63+
for topic, point, t in bag.read_messages(topics=['/lap_metrics']):
6464
y = yaml.load(str(point), Loader=yaml.FullLoader)
6565
h = json.dumps(y, indent=4)
6666
data = json.loads(h)
6767
lapdata = json.loads(data['data'])
6868

69-
for topic, point, t in bag.read_messages(topics=['/time_stats']):
69+
for topic, point, t in bag.read_messages(topics=['/time_metrics']):
7070
y = yaml.load(str(point), Loader=yaml.FullLoader)
7171
h = json.dumps(y, indent=4)
7272
data = json.loads(h)
73-
time_stats_metadata = json.loads(data['data'])
73+
time_metrics_metadata = json.loads(data['data'])
7474

7575
for topic, point, t in bag.read_messages(topics=['/first_image']):
7676
first_image = bridge.imgmsg_to_cv2(point, desired_encoding='passthrough')

behavior_metrics/brains/f1/brain_f1_keras-lstm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def __init__(self, sensors, actuators, model=None, handler=None):
4444
self.handler = handler
4545
self.cont = 0
4646
self.inference_times = []
47-
self.gpu_inferencing = True if tf.test.gpu_device_name() else False
47+
self.gpu_inference = True if tf.test.gpu_device_name() else False
4848
self.previous_images = np.zeros((1, 50, 100, 3))
4949
print(self.previous_images.shape)
5050
print(self.previous_images.shape)

behavior_metrics/brains/f1/brain_f1_keras.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def __init__(self, sensors, actuators, model=None, handler=None, config=None):
5151
os.environ["CUDA_VISIBLE_DEVICES"]="-1"
5252
import tensorflow as tf
5353

54-
self.gpu_inferencing = True if tf.test.gpu_device_name() else False
54+
self.gpu_inference = True if tf.test.gpu_device_name() else False
5555

5656
if model:
5757
if not path.exists(PRETRAINED_MODELS + model):

behavior_metrics/brains/f1/brain_f1_keras_classification-bw.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def __init__(self, sensors, actuators, model=None, handler=None, config=None):
3939
self.handler = handler
4040
self.cont = 0
4141
self.inference_times = []
42-
self.gpu_inferencing = True if tf.test.gpu_device_name() else False
42+
self.gpu_inference = True if tf.test.gpu_device_name() else False
4343

4444
if model:
4545
if not path.exists(PRETRAINED_MODELS + model):

behavior_metrics/brains/f1/brain_f1_keras_classification.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def __init__(self, sensors, actuators, model=None, handler=None, config=None):
3939
self.handler = handler
4040
self.cont = 0
4141
self.inference_times = []
42-
self.gpu_inferencing = True if tf.test.gpu_device_name() else False
42+
self.gpu_inference = True if tf.test.gpu_device_name() else False
4343

4444
if model:
4545
if not path.exists(PRETRAINED_MODELS + model):

behavior_metrics/brains/f1/brain_f1_keras_preprocessed.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def __init__(self, sensors, actuators, model=None, handler=None, config=None):
3636
self.handler = handler
3737
self.cont = 0
3838
self.inference_times = []
39-
self.gpu_inferencing = True if tf.test.gpu_device_name() else False
39+
self.gpu_inference = True if tf.test.gpu_device_name() else False
4040

4141
if model:
4242
if not path.exists(PRETRAINED_MODELS + model):

behavior_metrics/brains/f1/brain_f1_keras_preprocessed_lstm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def __init__(self, sensors, actuators, model=None, handler=None, config=None):
3939
self.handler = handler
4040
self.cont = 0
4141
self.inference_times = []
42-
self.gpu_inferencing = True if tf.test.gpu_device_name() else False
42+
self.gpu_inference = True if tf.test.gpu_device_name() else False
4343
self.previous_images = np.zeros((2, 13))
4444
if model:
4545
print(model)

behavior_metrics/brains/f1/brain_f1_keras_preprocessed_lstm_3_elements-60pts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def __init__(self, sensors, actuators, model=None, handler=None):
3939
self.handler = handler
4040
self.cont = 0
4141
self.inference_times = []
42-
self.gpu_inferencing = True if tf.test.gpu_device_name() else False
42+
self.gpu_inference = True if tf.test.gpu_device_name() else False
4343
self.previous_images = np.zeros((3, 60))
4444

4545
print(model)

behavior_metrics/brains/f1/brain_f1_keras_preprocessed_lstm_3_elements.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def __init__(self, sensors, actuators, model=None, handler=None):
3939
self.handler = handler
4040
self.cont = 0
4141
self.inference_times = []
42-
self.gpu_inferencing = True if tf.test.gpu_device_name() else False
42+
self.gpu_inference = True if tf.test.gpu_device_name() else False
4343
#self.previous_images = np.zeros((25, 13))
4444
self.previous_images = np.zeros((3, 31))
4545
#self.previous_images_1 = np.zeros((5, 13))

behavior_metrics/brains/f1/brain_f1_keras_preprocessed_lstm_5_elements.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def __init__(self, sensors, actuators, model=None, handler=None, config=None):
3939
self.handler = handler
4040
self.cont = 0
4141
self.inference_times = []
42-
self.gpu_inferencing = True if tf.test.gpu_device_name() else False
42+
self.gpu_inference = True if tf.test.gpu_device_name() else False
4343
self.previous_images = np.zeros((25, 13))
4444

4545
if model:

0 commit comments

Comments
 (0)