Created
July 10, 2020 07:44
-
-
Save masouduut94/d8b76368d2523c52aa6fb4affa5790fa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def set_top_k(self, value): | |
self.top_k_labels = value | |
def frame_exists(self, frame_id: int): | |
return frame_id in self.frames.keys() | |
def add_frame(self, frame_id: int): | |
# Use this function to add frames with index. | |
if not self.frame_exists(frame_id): | |
self.frames[frame_id] = Frame(frame_id) | |
else: | |
raise ValueError("Frame id: {} already exists".format(frame_id)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment