Used in propagate() to verify that the network input
        activations have been set.
429463
def verifyInputs(self):
        
        for layer in self.layers:
            if (layer.verify and
                layer.type == 'Input' and
                layer.kind != 'Context' and
                layer.active and
                not layer.activationSet):
                raise LayerError("Inputs are not set and verifyInputs() was called on layer '%s'." % layer.name)
            else:
                layer.resetActivationFlag()
1084717
def get_activations(self):
        """"""
        res = (self.added, self.removed)

        self.added = set()
        self.removed = set()

        return res
1259886
void notifyListenersNetworkUneachable() {
        // NOTE: synchronized(listener) causes deadlock with listeners and Replicator.lock.
        final Set<NetworkReachabilityListener> copy = new HashSet<>(listeners);
        for (NetworkReachabilityListener listener : copy) {
            if (listener != null) { listener.networkUnreachable(); }
        }
    }
1268756
void activate() {
        nodes().flatMap(e -> e.allKeysRecursively())
                .distinct()
                .forEach(key -> {
                    activate(key);
                });
    }
463191
def postActivate_(self):
        
        self.analyzer = LicensePlateDetector(**self.analyzer_pars) # this is called after the fork (i.e. after the multiprocess has been spawned)
        self.report("analyzer object=", self.analyzer)
1242284
@SuppressWarnings("checkstyle:npathcomplexity")
    public void verify() {
        int countEnabled = 0;
        if (getTcpIpConfig().isEnabled()) {
            countEnabled++;
        }
        if (getMulticastConfig().isEnabled()) {
            countEnabled++;
        }
        if (getAwsConfig().isEnabled()) {
            countEnabled++;
        }
        if (getGcpConfig().isEnabled()) {
            countEnabled++;
        }
        if (getAzureConfig().isEnabled()) {
            countEnabled++;
        }
        if (getKubernetesConfig().isEnabled()) {
            countEnabled++;
        }
        if (getEurekaConfig().isEnabled()) {
            countEnabled++;
        }

        if (countEnabled > 1) {
            throw new InvalidConfigurationException("Multiple join configuration cannot be enabled at the same time. Enable only "
                    + "one of: TCP/IP, Multicast, AWS, GCP, Azure, Kubernetes, or Eureka");
        }

        verifyDiscoveryProviderConfig();
    }
378329
private void putIntoActivation(int index, Object value) {
        String argName = activation.function.getParamOrVarName(index);
        activation.put(argName, activation, value);
    }
1220200
def HandlePeerInfoReceived(self, payload):
        """"""
        addrs = IOHelper.AsSerializableWithType(payload, 'neo.Network.Payloads.AddrPayload.AddrPayload')

        if not addrs:
            return

        for nawt in addrs.NetworkAddressesWithTime:
            self.leader.RemoteNodePeerReceived(nawt.Address, nawt.Port, self.prefix)
1215190
@Override
	public void propagate(int evtmask) throws ContradictionException {
		int min = 0;
		int max = 0;
		ISet nodes = g.getPotentialNodes();
		for (int i : nodes) {
			if (g.getMandSuccOrNeighOf(i).contains(i)) {
				min++;
				max++;
			} else if (g.getPotSuccOrNeighOf(i).contains(i)) {
				max++;
			}
		}
		k.updateLowerBound(min, this);
		k.updateUpperBound(max, this);
		if (min == max) {
			setPassive();
		} else if (k.isInstantiated()) {
			if (k.getValue() == max) {
				for (int i : nodes) {
					if (g.getPotSuccOrNeighOf(i).contains(i)) {
						g.enforceArc(i, i, this);
					}
				}
				setPassive();
			} else if (k.getValue() == min) {
				for (int i : nodes) {
					if (!g.getMandSuccOrNeighOf(i).contains(i)) {
						g.removeArc(i, i, this);
					}
				}
				setPassive();
			}
		}
	}
605810
def activation_done(self, *args, **kwargs):
        """"""
        if self._save:
            self.save_task()
        else:
            super().activation_done(*args, **kwargs)
370076
public static int cudnnActivationForward(
        cudnnHandle handle, 
        cudnnActivationDescriptor activationDesc, 
        Pointer alpha, 
        cudnnTensorDescriptor xDesc, 
        Pointer x, 
        Pointer beta, 
        cudnnTensorDescriptor yDesc, 
        Pointer y)
    {
        return checkResult(cudnnActivationForwardNative(handle, activationDesc, alpha, xDesc, x, beta, yDesc, y));
    }
4001
protected static void checkSameExecutionContext(DataSet<?> set1, DataSet<?> set2) {
		if (set1.context != set2.context) {
			throw new IllegalArgumentException("The two inputs have different execution contexts.");
		}
	}
941099
def propagate(self, request: Request, clientName):
        
        if self.requests.has_propagated(request, self.name):
            logger.trace("{} already propagated {}".format(self, request))
        else:
            with self.metrics.measure_time(MetricsName.SEND_PROPAGATE_TIME):
                self.requests.add_propagate(request, self.name)
                propagate = self.createPropagate(request, clientName)
                logger.debug("{} propagating request {} from client {}".format(self, request.key, clientName),
                             extra={"cli": True, "tags": ["node-propagate"]})
                self.send(propagate)
169262
def step(self, provided_inputs):
        
        # validate_inputs
        for wire, value in provided_inputs.items():
            wire = self.block.get_wirevector_by_name(wire) if isinstance(wire, str) else wire
            if value > wire.bitmask or value < 0:
                raise PyrtlError("Wire {} has value {} which cannot be represented"
                                 " using its bitwidth".format(wire, value))

        # building the simulation data
        ins = {self._to_name(wire): value for wire, value in provided_inputs.items()}
        ins.update(self.regs)
        ins.update(self.mems)

        # propagate through logic
        self.regs, self.outs, mem_writes = self.sim_func(ins)

        for mem, addr, value in mem_writes:
            self.mems[mem][addr] = value

        # for tracer compatibility
        self.context = self.outs.copy()
        self.context.update(ins)  # also gets old register values
        if self.tracer is not None:
            self.tracer.add_fast_step(self)

        # check the rtl assertions
        check_rtl_assertions(self)
636819
private void propagate(Layer lower, Layer upper) {
        for (int i = 0; i < upper.units; i++) {
            double sum = 0.0;
            for (int j = 0; j <= lower.units; j++) {
                sum += upper.weight[i][j] * lower.output[j];
            }

            if (upper == outputLayer) {
                upper.output[i] = sum;
            }

            else {
                if (activationFunction == ActivationFunction.LOGISTIC_SIGMOID) {
                    upper.output[i] = Math.logistic(sum);
                }
                else if (activationFunction==ActivationFunction.TANH){
                    upper.output[i]=(2*Math.logistic(2*sum))-1;
                }
            }
        }
    }
107672
public static void propagateToParent(WorkProgress subTask, WorkProgress parentTask, long amount) {
		Runnable update = new Runnable() {
			private long propagated = 0;
			@Override
			public void run() {
				long pos = subTask.getAmount();
				if (pos > 0) pos = subTask.getPosition() * amount / pos;
				if (pos == propagated) return;
				synchronized (parentTask) {
					parentTask.progress(pos - propagated);
				}
				propagated = pos;
			}
		};
		subTask.listen(update);
		update.run();
	}
641399
def prop_from(self, startLayers):
        
        if self.verbosity > 2: print("Partially propagating network:")
        # find all the layers involved in the propagation
        propagateLayers = []
        # propagateLayers should not include startLayers (no loops)
        for startLayer in startLayers:
            for layer in self.layers:
                if self.path(startLayer, layer):
                    propagateLayers.append(layer)
        for layer in propagateLayers:
            if layer.active: 
                layer.netinput = (layer.weight).copy() 
        for layer in propagateLayers:
            if layer.active:
                for connection in self.connections:
                    if connection.active and connection.toLayer.name == layer.name:
                        connection.toLayer.netinput = connection.toLayer.netinput + \
                                                      Numeric.matrixmultiply(connection.fromLayer.activation,\
                                                                             connection.weight) # propagate!
                if layer.type != 'Input':
                    layer.activation = self.activationFunction(layer.netinput)
        for layer in propagateLayers:
            if layer.log and layer.active:
                layer.writeLog(self)