Showing
11 changed files
with
6 additions
and
3 deletions
No preview for this file type
... | @@ -8,8 +8,7 @@ import esot3ria.video_recommender as recommender | ... | @@ -8,8 +8,7 @@ import esot3ria.video_recommender as recommender |
8 | import esot3ria.video_util as videoutil | 8 | import esot3ria.video_util as videoutil |
9 | 9 | ||
10 | # Define file paths. | 10 | # Define file paths. |
11 | -MODEL_PATH = "/Users/esot3ria/PycharmProjects/yt8m/models/frame/" \ | 11 | +MODEL_PATH = "/Users/esot3ria/PycharmProjects/yt8m/models/frame/refined_model/inference_model/segment_inference_model" |
12 | - "refined_model/inference_model/segment_inference_model" | ||
13 | VOCAB_PATH = "../vocabulary.csv" | 12 | VOCAB_PATH = "../vocabulary.csv" |
14 | VIDEO_TAGS_PATH = "./kaggle_solution_40k.csv" | 13 | VIDEO_TAGS_PATH = "./kaggle_solution_40k.csv" |
15 | TAG_VECTOR_MODEL_PATH = "./tag_vectors.model" | 14 | TAG_VECTOR_MODEL_PATH = "./tag_vectors.model" |
... | @@ -218,6 +217,6 @@ def inference_pb(file_path): | ... | @@ -218,6 +217,6 @@ def inference_pb(file_path): |
218 | 217 | ||
219 | 218 | ||
220 | if __name__ == '__main__': | 219 | if __name__ == '__main__': |
221 | - filepath = "features.pb" | 220 | + filepath = "../featuremaps/features(yorusika).pb" |
222 | result = inference_pb(filepath) | 221 | result = inference_pb(filepath) |
223 | print(result) | 222 | print(result) | ... | ... |
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
... | @@ -335,7 +335,11 @@ def inference(reader, train_dir, data_pattern, out_file_location, batch_size, | ... | @@ -335,7 +335,11 @@ def inference(reader, train_dir, data_pattern, out_file_location, batch_size, |
335 | cls_score_dict = {} | 335 | cls_score_dict = {} |
336 | out_file.seek(0, 0) | 336 | out_file.seek(0, 0) |
337 | old_seg_name = '0000' | 337 | old_seg_name = '0000' |
338 | + counter = 0 | ||
338 | for line in out_file: | 339 | for line in out_file: |
340 | + counter += 1 | ||
341 | + if counter / 5000 == 0: | ||
342 | + print(counter, " processed") | ||
339 | segment_id, preds = line.decode("utf8").split(",") | 343 | segment_id, preds = line.decode("utf8").split(",") |
340 | if segment_id == "VideoId": | 344 | if segment_id == "VideoId": |
341 | # Skip the headline. | 345 | # Skip the headline. | ... | ... |
-
Please register or login to post a comment