bc73d367e95cfbf410c97cdfa2abe87ee77199fb,kur/containers/layers/dense.py,Dense,_parse,#Dense#Any#,32

Before Change


		try:
			self.size = int(self.size)
		except ValueError:
			raise ParsingError("Key "size" in Dense layer must be an integer.")

	////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	def _build(self, backend):
		 Create the backend-specific placeholder.

After Change


		if isinstance(self.args, dict):
			self.size = engine.evaluate(self.args["size"], recursive=True)
		elif isinstance(self.args, list):
			self.size = engine.evaluate(self.args, recursive=True)
		else:
			self.size = self.args

		if not isinstance(self.size, (tuple, list)):
			self.size = [self.size]

		try:
			for i, v in enumerate(self.size):
				self.size[i] = int(v)
		except ValueError:
			raise ParsingError("Key "size" in Dense layer must be an integer "
				"or a list of integers. Received: {}".format(self.size))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: deepgram/kur
Commit Name: bc73d367e95cfbf410c97cdfa2abe87ee77199fb
Time: 2016-11-28
Author: ajsyp@syptech.net
File Name: kur/containers/layers/dense.py
Class Name: Dense
Method Name: _parse


Project Name: cornellius-gp/gpytorch
Commit Name: d239093cc403fa72acf0c09e8658d6f7e6a7b90d
Time: 2017-11-08
Author: gpleiss@gmail.com
File Name: gpytorch/posterior/posterior_strategy.py
Class Name: PosteriorStrategy
Method Name: exact_posterior_covar


Project Name: cornellius-gp/gpytorch
Commit Name: 38a40828ec688be626e51ebcb1a60a54479fd997
Time: 2017-08-29
Author: ruihan.wu14@gmail.com
File Name: gpytorch/lazy/toeplitz_lazy_variable.py
Class Name: ToeplitzLazyVariable
Method Name: diag