555ca942df407b8c1bf1d48383c60fa1bf09cc1d,keras/engine/network.py,Network,losses,#Network#,417
Before Change
// Add any potential unconditional model-level loss.
losses += self.get_losses_for(None)
unique_tensors = list(
set(x for x in losses if not isinstance(x, (float, int))))
non_tensors = [x for x in losses if isinstance(x, (float, int))]
return unique_tensors + non_tensors
@property
After Change
losses += self.get_losses_for(None)
unique_tensors = []
unique_tensors_ids = set()
for x in losses:
if not isinstance(x, (float, int)):
if id(x) not in unique_tensors_ids:
unique_tensors.append(x)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 6
Instances Project Name: keras-team/keras
Commit Name: 555ca942df407b8c1bf1d48383c60fa1bf09cc1d
Time: 2019-08-28
Author: francois.chollet@gmail.com
File Name: keras/engine/network.py
Class Name: Network
Method Name: losses
Project Name: stanford-mast/nn_dataflow
Commit Name: dbce7a60ae3be16be1baaf9c76b9d8067484213f
Time: 2017-08-17
Author: mgao12@stanford.edu
File Name: nn_dataflow/Scheduling.py
Class Name: Scheduling
Method Name: schedule_search
Project Name: andresriancho/w3af
Commit Name: 738966599b7e1eba13da06aa947797c01a54d26a
Time: 2018-07-19
Author: andres.riancho@gmail.com
File Name: w3af/plugins/grep/cross_domain_js.py
Class Name: cross_domain_js
Method Name: _load_secure_js_file
Project Name: idaholab/raven
Commit Name: fcb05df08ef25ee5d9e5f015335d64fdd156bf38
Time: 2020-11-09
Author: mohammad.abdo@inl.gov
File Name: framework/Optimizers/mutators/mutators.py
Class Name:
Method Name: swapMutator