Skip to content

Commit

Permalink
Replaced variable names in for loops
Browse files Browse the repository at this point in the history
  • Loading branch information
Cedric Carl-Franek Kränzle committed Apr 11, 2024
1 parent b58ff03 commit 3e3d1e3
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions examples/visual_voice_activity_detection/vvad_lrs3_dataset.py
Original file line number Diff line number Diff line change
@@ -90,8 +90,8 @@ def __call__(self):
x_train = data.get('x_test')
y_train = data.get('y_test')

for i in indexes:
yield self.generate_x_data(x_train, i), y_train[i]
for index in indexes:
yield self.generate_x_data(x_train, index), y_train[index]
data.close()

def get_data_and_video_size(self):
6 changes: 3 additions & 3 deletions paz/processors/standard.py
Original file line number Diff line number Diff line change
@@ -595,9 +595,9 @@ def call(self, value):
result = value
else:
total_weights = 0
for i in range(0, size):
weight = (i + 1) / size
result += self.predictions[i] * weight
for prediction_index in range(0, size):
weight = (prediction_index + 1) / size
result += self.predictions[prediction_index] * weight
total_weights += weight
result = result / total_weights
return result

0 comments on commit 3e3d1e3

Please sign in to comment.