92ac048f7d5dcf86bb86e840eb5f9179cc8e114a,open_seq2seq/utils/utils.py,,check_params,#,44

Before Change


    else:
      if vals and type(vals) is list and config[pm] not in vals:
        raise ValueError("{} has to be one of {}".format(pm, vals))
      if vals and type(vals) is not list and type(config[pm]) is not vals:
        raise ValueError("{} has to be of type {}".format(pm, vals))

  for pm, vals in optional_dict.items():

After Change


        vals = string_types
      if vals and isinstance(vals, list) and config[pm] not in vals:
        raise ValueError("{} has to be one of {}".format(pm, vals))
      if vals and not isinstance(vals, list) and not isinstance(config[pm], vals):
        raise ValueError("{} has to be of type {}".format(pm, vals))

  for pm, vals in optional_dict.items():
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: NVIDIA/OpenSeq2Seq
Commit Name: 92ac048f7d5dcf86bb86e840eb5f9179cc8e114a
Time: 2018-04-27
Author: igor.a.gitman@gmail.com
File Name: open_seq2seq/utils/utils.py
Class Name:
Method Name: check_params


Project Name: keras-team/autokeras
Commit Name: 49ca8c83ca65a1060713d0295d1d206b43933e3b
Time: 2017-12-18
Author: jhfjhfj1@gmail.com
File Name: autokeras/comparator.py
Class Name:
Method Name: compare_network