def main(_):
    checkpoint_path = FLAGS.checkpoint_path
    train_shards = glob.glob(FLAGS.train_dataset_shards)
    test_shards = glob.glob(FLAGS.test_dataset_shards)
    video_config = evaluate_video_embedding.VideoConfig(num_frames=FLAGS.num_video_frames, image_size=FLAGS.image_size, video_step=FLAGS.video_step)
    video_embedding_fn = _video_embedding(checkpoint_path)
    results = evaluate_video_embedding.evaluate_video_embedding(train_dataset_shards=train_shards, test_dataset_shards=test_shards, embedding_fn=video_embedding_fn, config=video_config, svm_regularization=FLAGS.svm_regularization, batch_size=FLAGS.batch_size)
    results_dct = dict(top_1_train=results.train.top_one_accuracy, top_5_train=results.train.top_five_accuracy, top_1_test=results.test.top_one_accuracy, top_5_test=results.test.top_five_accuracy)
    print(json.dumps(results_dct))
def main(_):
    checkpoint_path = FLAGS.checkpoint_path
    train_shards = glob.glob(FLAGS.train_dataset_shards)
    test_shards = glob.glob(FLAGS.test_dataset_shards)
    video_config = evaluate_video_embedding.VideoConfig(num_frames=FLAGS.num_video_frames, image_size=FLAGS.image_size, video_step=FLAGS.video_step)
    video_embedding_fn = _video_embedding(checkpoint_path)
    results = evaluate_video_embedding.evaluate_video_embedding(train_dataset_shards=train_shards, test_dataset_shards=test_shards, embedding_fn=video_embedding_fn, config=video_config, svm_regularization=FLAGS.svm_regularization, batch_size=FLAGS.batch_size)
    results_dct = dict(top_1_train=results.train.top_one_accuracy, top_5_train=results.train.top_five_accuracy, top_1_test=results.test.top_one_accuracy, top_5_test=results.test.top_five_accuracy)
    print(json.dumps(results_dct))