bc6c691202e5f8755de7b13d88f86286ff878abb,kur/backend/pytorch_backend.py,PyTorchBackend,process_loss,#PyTorchBackend#Any#Any#,244

Before 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. "

After Change


				loss_with_names.append((x["target"], x))

		elif isinstance(loss, (dict, OrderedDict)):
			loss_with_names = list(loss.items())

		else:
			raise ValueError("Loss functions given to "compile" should be "
				"a list/tuple, a dictionary, or a single Loss instance. "
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: deepgram/kur
Commit Name: bc6c691202e5f8755de7b13d88f86286ff878abb
Time: 2017-05-10
Author: ajsyp@syptech.net
File Name: kur/backend/pytorch_backend.py
Class Name: PyTorchBackend
Method Name: process_loss


Project Name: bokeh/bokeh
Commit Name: 3eaa05a6fcef60abc7680d8b4465da0032750a35
Time: 2018-06-07
Author: mattpap@gmail.com
File Name: bokeh/embed/standalone.py
Class Name:
Method Name: autoload_static


Project Name: deepgram/kur
Commit Name: bc6c691202e5f8755de7b13d88f86286ff878abb
Time: 2017-05-10
Author: ajsyp@syptech.net
File Name: kur/backend/keras_backend.py
Class Name: KerasBackend
Method Name: process_loss


Project Name: chakki-works/doccano
Commit Name: 49d41416e440926f0a9a8243b4d77f6f5468efe9
Time: 2019-03-12
Author: light.tree.1.13@gmail.com
File Name: app/server/utils.py
Class Name: JsonHandler
Method Name: parse