bc6c691202e5f8755de7b13d88f86286ff878abb,kur/backend/keras_backend.py,KerasBackend,process_loss,#KerasBackend#Any#Any#,530

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


			logger.debug("These layers will be output-only layers, without "
				"loss functions attached: %s", ", ".join(output_only))

		if isinstance(loss, (list, tuple)):
			loss_with_names = []
			for x in loss:
				if not isinstance(x, (dict, OrderedDict)):
					raise ValueError("Expected each individual loss entry to "
						"be a dictionary. Received: {}".format(x))
				if not "target" in x:
					raise ValueError("Missing required key in loss function: "
						""target".")
				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. "
				"Instead we received this: {} (type={})"
				.format(loss, type(loss)))

		loss_inputs = OrderedDict()
		loss_outputs = OrderedDict()
		for target, this_loss in loss_with_names:
			ins, out = this_loss.get_loss(
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

Instances


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: HazyResearch/fonduer
Commit Name: a3400845afb88d0d9b19f7f810abbd718117f24e
Time: 2018-10-17
Author: lukehsiao@users.noreply.github.com
File Name: src/fonduer/utils/utils_udf.py
Class Name:
Method Name: get_sparse_matrix


Project Name: bokeh/bokeh
Commit Name: 95ab2d1f1cb241580a566644df07b9810e852959
Time: 2015-08-17
Author: nroth@dealnews.com
File Name: bokeh/charts/_data_source.py
Class Name: ChartDataSource
Method Name: get_selections