Home | History | Annotate | Download | only in layers

Lines Matching defs:updates

391       This recursively updates the map `layer_indices`,
602 def updates(self):
603 """Retrieve the network's updates.
605 Will only include updates that are either
607 (e.g. will not include updates that were created by layers of this model
610 Effectively, `network.updates` behaves like `layer.updates`.
617 _ = bn(x1) # This creates 2 updates.
620 y2 = bn(x2) # This creates 2 more updates.
622 # The BN layer has now 4 updates.
623 self.assertEqual(len(bn.updates), 4)
628 # The model does not list all updates from its underlying layers,
629 # but only the updates that are relevant to it. Updates created by layers
631 self.assertEqual(len(model.updates), 2)
633 # If you keep calling the model, you append to its updates, just like
637 self.assertEqual(len(model.updates), 4)
640 # the model's updates.
643 self.assertEqual(len(model.updates), 4)
655 updates = []
657 updates += layer.updates
659 # `updates` might contain irrelevant updates, so it needs to be filtered
668 reachable = layers_util.get_reachable_from_inputs(relevant_inputs, updates)
669 relevant_conditional_updates = [x for x in updates if x in reachable]
671 x for x in updates if x._unconditional_update] # pylint: disable=protected-access
673 # so the updates list must be de-duped.