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

Before Change


    bottleneck_path = get_bottleneck_path(image_lists, label_name, index,
                                          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)

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: rwth-i6/returnn
Commit Name: c8f6c16ba05060a9db21cb195d82bf535b6facd1
Time: 2020-12-02
Author: albert.zeyer@rwth-aachen.de
File Name: returnn/__setup__.py
Class Name:
Method Name: get_version_str


Project Name: hanxiao/bert-as-service
Commit Name: a8d0b230181c9f148017510c0318ad0300ade518
Time: 2019-01-16
Author: hanhxiao@tencent.com
File Name: server/bert_serving/server/helper.py
Class Name: BertRequestHandler
Method Name: do_POST