I hereby claim:
- I am svenkreiss on github.
- I am svenkreiss (https://keybase.io/svenkreiss) on keybase.
- I have a public key ASByz07iHv4Qn2QKTFjTDgamfxLz09THQMl8hQ6ooeyTcAo
To claim this, I am signing this object:
class GradScale100(torch.autograd.Function): | |
@staticmethod | |
def forward(ctx, input): | |
return input | |
@staticmethod | |
def backward(ctx, grad_output): | |
return grad_output * 0.01 |
I hereby claim:
To claim this, I am signing this object:
class MapF(object): | |
def __init__(self, f): | |
self.f = f | |
def __call__(self, tc, i, x): | |
return (self.f(xx) for xx in x) |
from pysparkling import Context | |
counts = Context().textFile( | |
'README.rst' | |
).flatMap( | |
lambda line: line.split(' ') | |
).map( | |
lambda word: (word, 1) | |
).reduceByKey( | |
lambda a, b: a + b |