Skip to content

Commit

Permalink
attempt to fix negative start_time in embedding part
Browse files Browse the repository at this point in the history
  • Loading branch information
clement-pages committed Jun 20, 2023
1 parent 78718b1 commit dfdd8f3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ def draw_embedding_chunk(self, klass : Text,
segment = np.random.choice(class_segments, p=prob_segments)

# sample chunk start time in order to intersect it with the sampled segment
start_time = np.random.uniform(segment["start"] - duration / 2, segment["start"])
start_time = np.random.uniform(max(segment["start"] - duration / 2, 0), segment["start"])

return (segment["file_id"], start_time)

Expand Down

0 comments on commit dfdd8f3

Please sign in to comment.