d1dfcc0b80c4ecead8866473e5cfdfd351ac7cbd,kur/backend/keras_backend.py,KerasBackend,process_loss,#KerasBackend#Any#Any#,530
Before Change
if isinstance(loss, Loss):
loss = [loss]
if len(loss) != len(model.outputs):
raise ValueError("Model has {} outputs, but only {} loss "
"functions were specified."
.format(len(model.outputs), len(loss)))
if isinstance(loss, (list, tuple)):
loss = dict(zip(model.outputs, loss))
if not isinstance(loss, (dict, OrderedDict)):
After Change
"loss functions attached: %s", ", ".join(output_only))
if isinstance(loss, (list, tuple)):
loss = {x.get("target") : x for x in loss}
if not isinstance(loss, (dict, OrderedDict)):
raise ValueError("Loss functions given to "compile" should be "
"a list/tuple, a dictionary, or a single Loss instance. "
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 11
Instances Project Name: deepgram/kur
Commit Name: d1dfcc0b80c4ecead8866473e5cfdfd351ac7cbd
Time: 2017-05-10
Author: ajsyp@syptech.net
File Name: kur/backend/keras_backend.py
Class Name: KerasBackend
Method Name: process_loss
Project Name: tensorflow/datasets
Commit Name: 77215c41d87a1c8d4a3b1ce51aceec1f7e1f2be9
Time: 2018-11-28
Author: epot@google.com
File Name: tensorflow_datasets/core/features/class_label_feature.py
Class Name: ClassLabel
Method Name: __init__
Project Name: deepgram/kur
Commit Name: d1dfcc0b80c4ecead8866473e5cfdfd351ac7cbd
Time: 2017-05-10
Author: ajsyp@syptech.net
File Name: kur/backend/pytorch_backend.py
Class Name: PyTorchBackend
Method Name: process_loss