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

Before Change


        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)

    with open(bottleneck_path, "r") as bottleneck_file:

After Change


  except:
    print("Invalid float found, recreating bottleneck")
    did_hit_error = True
  if did_hit_error:
    create_bottleneck_file(bottleneck_path, image_lists, label_name, index, image_dir, category, sess, jpeg_data_tensor, bottleneck_tensor)
    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
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

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: kubeflow/kubeflow
Commit Name: ac649bff69dbce9c4169cff5ec09d7b8da017f1c
Time: 2018-08-01
Author: lunkai@google.com
File Name: testing/test_tf_serving.py
Class Name:
Method Name: main


Project Name: markovmodel/PyEMMA
Commit Name: eddb91dbe8b2aff9882ae8bd72d6dbce44513e1d
Time: 2017-04-07
Author: m.scherer@fu-berlin.de
File Name: pyemma/_base/serialization/serialization.py
Class Name:
Method Name: load