5498cb8bd7e7f3bb10ffe7d2c7ce3b0753df71e2,src/train/retrain.py,,get_or_create_bottleneck,#Any#Any#Any#Any#Any#Any#Any#Any#Any#,386

Before Change


                                          bottleneck_dir, category)
    if not os.path.exists(bottleneck_path):
        print("Creating bottleneck at " + bottleneck_path)
        image_path = get_image_path(image_lists, label_name, index, image_dir,
                                    category)
        if not gfile.Exists(image_path):
            tf.logging.fatal("File does not exist %s", image_path)
        image_data = gfile.FastGFile(image_path, "rb").read()
        bottleneck_values = run_bottleneck_on_image(sess, image_data,
                                                    jpeg_data_tensor,
                                                    bottleneck_tensor)
        bottleneck_string = ",".join(str(x) for x in bottleneck_values)
        with open(bottleneck_path, "w") as bottleneck_file:
            bottleneck_file.write(bottleneck_string)

After Change


    with open(bottleneck_path, "r") as bottleneck_file:
      bottleneck_string = bottleneck_file.read()
    // Allow exceptions to propagate here, since they shouldn"t happen after a fresh creation
    bottleneck_values = [float(x) for x in bottleneck_string.split(",")]
  return bottleneck_values

def cache_bottlenecks(sess, image_lists, image_dir, bottleneck_dir,
                      jpeg_data_tensor, bottleneck_tensor):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 6

Instances


Project Name: geometalab/OSMDeepOD
Commit Name: 5498cb8bd7e7f3bb10ffe7d2c7ce3b0753df71e2
Time: 2017-03-20
Author: samuel.kurath@gmail.com
File Name: src/train/retrain.py
Class Name:
Method Name: get_or_create_bottleneck


Project Name: probcomp/bayeslite
Commit Name: 671ed2bdfa75d7fe2bebe6f63eb928260e40b7af
Time: 2017-01-30
Author: curlette@mit.edu
File Name: src/guess.py
Class Name:
Method Name: keyable_p


Project Name: deeptools/HiCExplorer
Commit Name: 0a90a1d137bb4fa0b42d3ffbe8e0594e90eafa06
Time: 2019-04-04
Author: wolffj@informatik.uni-freiburg.de
File Name: hicexplorer/chicAggregateStatistic.py
Class Name:
Method Name: write


Project Name: brian-team/brian2
Commit Name: c84200e9bb97b39a73778e5b32df3b85cb2614c9
Time: 2013-06-25
Author: dan.goodman@ens.fr
File Name: brian2/tests/test_syntax_translation.py
Class Name:
Method Name: parse_expressions