Call forward_mode; discard value, only keep the derivative.
422394
def diff(self, *args):
        """"""
        arg_dicts = self._parse_args_forward_mode(*args)
        val, diff = self._forward_mode(*arg_dicts)
        return diff
292576
def forward(self, x: torch.Tensor, sublayer: Callable[[torch.Tensor], torch.Tensor]) -> torch.Tensor:
        """"""
        return x + self.dropout(sublayer(self.norm(x)))
931754
def _skip(self, cnt):
        

        while cnt > 0:
            # next vol needed?
            if self._cur_avail == 0:
                if not self._open_next():
                    break

            # fd is in read pos, do the read
            if cnt > self._cur_avail:
                cnt -= self._cur_avail
                self._remain -= self._cur_avail
                self._cur_avail = 0
            else:
                self._fd.seek(cnt, 1)
                self._cur_avail -= cnt
                self._remain -= cnt
                cnt = 0
991631
@Override
    public Tensor forward() {
        Tensor x = modInX.getOutput();
        y = new Tensor(x); // copy
        y.exp();
        return y;
    }
864161
void discardUnusedTail()
    {
        // we guard this with the OpOrdering instead of synchronised due to potential dead-lock with CLSM.advanceAllocatingFrom()
        // this actually isn't strictly necessary, as currently all calls to discardUnusedTail occur within a block
        // already protected by this OpOrdering, but to prevent future potential mistakes, we duplicate the protection here
        // so that the contract between discardUnusedTail() and sync() is more explicit.
        try (OpOrder.Group group = appendOrder.start())
        {
            while (true)
            {
                int prev = allocatePosition.get();
                // we set allocatePosition past buffer.capacity() to make sure we always set discardedTailFrom
                int next = buffer.capacity() + 1;
                if (prev == next)
                    return;
                if (allocatePosition.compareAndSet(prev, next))
                {
                    discardedTailFrom = prev;
                    return;
                }
            }
        }
    }
1158107
def stop_transmit(self, fd):
        
        self._wfds.pop(fd, None)
        self._update(fd)
1218962
def F(self, value):
        """"""
        self._F = value
        self._F_inv = self.inv(self._F)
387481
def away(dev, away_end, temperature):
    
    if away_end:
        click.echo("Setting away until %s, temperature: %s" % (away_end, temperature))
    else:
        click.echo("Disabling away mode")
    dev.set_away(away_end, temperature)
1130095
def _forward_iterator(self):
        ""
        path = [(self, 0, Bits())]
        while path:
            node, idx, prefix = path.pop()
            if idx==0 and node.value is not None and not node.prune_value:
                yield (self._unpickle_key(prefix), self._unpickle_value(node.value))
            if idx<len(node.children):
                path.append((node, idx+1, prefix))
                link = node.children[idx]
                if not link.pruned:
                    path.append((link.node, 0, prefix + link.prefix))
365490
def _forward_mode(self, *args):
        """"""
        # Evaluate inner function self.f
        X: np.ndarray
        dX: np.ndarray
        X, dX = self.f._forward_mode(*args)
        # Alias the power to p for legibility
        p: float = self.p
        # The function value
        val = X ** p
        # The derivative
        diff = p * X ** (p-1) * dX
        return (val, diff)
155084
def _forward_mode(self, *args):
        """"""
        # Parse arguments into two numpy arrays
        X: np.ndarray
        dX: np.ndarray
        X, dX = self._parse_dicts(*args)
        # The value is X
        if X is not None:
            val = X
        else:
            val = self.X
        # The derivative is the seed dX
        if dX is not None:
            diff = dX
        else:
            diff = np.ones_like(val)
        # Return both arrays
        return (val, diff)
377176
def discard(self, value):
        """"""
        # Raise TypeError if value is not hashable
        hash(value)

        self.redis.srem(self.key, self._pickle(value))
468759
public void removeValue(V value) {

        Set<K> keys = m_reverseMap.removeAll(value);
        for (K key : keys) {
            m_forwardMap.remove(key);
        }
    }
955404
def _reduced_call(self, **params_to_override):
        
        p=param.ParamOverrides(self,params_to_override)

        fn_result = self.function(p)
        self._apply_mask(p,fn_result)
        result = p.scale*fn_result+p.offset
        return result
133229
def forward_message(self, *args, **kwargs):
        """"""
        return forward_message(*args, **self._merge_overrides(**kwargs)).run()
1374846
private void switchToForward() {
        assert(state == State.ITER_CHECK_BWD ||
                (state == State.ITER_IN_FCD_SEGMENT && pos == limit) ||
                (state.compareTo(State.IN_NORM_ITER_AT_LIMIT) >= 0 && pos == normalized.length()));
        if(state == State.ITER_CHECK_BWD) {
            // Turn around from backward checking.
            start = pos = iter.getIndex();
            if(pos == limit) {
                state = State.ITER_CHECK_FWD;  // Check forward.
            } else {  // pos < limit
                state = State.ITER_IN_FCD_SEGMENT;  // Stay in FCD segment.
            }
        } else {
            // Reached the end of the FCD segment.
            if(state == State.ITER_IN_FCD_SEGMENT) {
                // The input text segment is FCD, extend it forward.
            } else {
                // The input text segment needed to be normalized.
                // Switch to checking forward from it.
                if(state == State.IN_NORM_ITER_AT_START) {
                    iter.moveIndex(limit - start);
                }
                start = limit;
            }
            state = State.ITER_CHECK_FWD;
        }
    }
203939
def move_backward(self):
        """"""
        self.at(ardrone.at.pcmd, True, 0, self.speed, 0, 0)