ba28f13e3c6bbeb8521feef63af72557ac08781b,opennmt/utils/checkpoint.py,,_restore_v1_checkpoint,#Any#Any#Any#,189

Before Change


      del v1_structure[_V1_OPTIM_SCOPE]
      v1_structure = _merge_optimizer_slots(v1_structure, slots)
  mapping = model.map_v1_weights(v1_structure)
  missing_mapping = set(model.variables).difference(set(six.iterkeys(mapping)))
  if missing_mapping:
    raise ValueError("The following variables were not mapped: %s" % (
        ", ".join(var.name for var in missing_mapping)))
  // Assign each variable and possibly the optimizer slots.

After Change


      v1_structure = _merge_optimizer_slots(v1_structure, slots)
  mapping = model.map_v1_weights(v1_structure)
  existing_variables = set(variable.experimental_ref() for variable in model.variables)
  mapped_variables = set(variable.experimental_ref() for variable, _ in mapping)
  missing_mapping = existing_variables.difference(mapped_variables)
  if missing_mapping:
    raise ValueError("The following variables were not mapped: %s" % (
        ", ".join(var.name for var in missing_mapping)))
  // Assign each variable and possibly the optimizer slots.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: OpenNMT/OpenNMT-tf
Commit Name: ba28f13e3c6bbeb8521feef63af72557ac08781b
Time: 2019-08-26
Author: guillaume.klein@systrangroup.com
File Name: opennmt/utils/checkpoint.py
Class Name:
Method Name: _restore_v1_checkpoint


Project Name: pantsbuild/pants
Commit Name: 6229c419d8f1b63cac22f23f24e19ef28d89b0a3
Time: 2018-06-27
Author: dawagner@gmail.com
File Name: src/python/pants/backend/graph_info/tasks/cloc.py
Class Name: CountLinesOfCode
Method Name: console_output


Project Name: biolab/orange3
Commit Name: 8d4d199c35f5163ed21ae705a16ce3c8548d60c6
Time: 2012-11-28
Author: janez.demsar@fri.uni-lj.si
File Name: Orange/data/io.py
Class Name: BasketReader
Method Name: prescan_file