less {filename}
| Navigation | |
|---|---|
SPACE |
forward one window |
b |
backward one window |
d |
forward half window |
| #!/usr/bin/env python | |
| ''' | |
| Simple and functional REST server for Python (2.7) using no dependencies beyond the Python standard library. | |
| Features: | |
| * Map URI patterns using regular expressions | |
| * Map any/all the HTTP VERBS (GET, PUT, DELETE, POST) | |
| * All responses and payloads are converted to/from JSON for you |
I had this gross reshape/tensor product/transpose stuff on huge matrices, and I knew it was making
intermediate copies of the matrices that I didn't want to. So I tried out np.einsum, and
I think it actually turned out simpler than thinking through the other matrix manipulation.
Here are some quick notes.
| class einsum_conv(nn.Module): | |
| def __init__(self, kernel_size, stride=1): | |
| super(einsum_conv, self).__init__() | |
| self.ks = kernel_size | |
| self.stride = stride | |
| def forward(self, x, kernel): | |
| if len(x.size()) == 3: | |
| x = x.unsqueeze(0) |
| [Unit] | |
| Wants=network-pre.target | |
| Before=network-pre.target shutdown.target | |
| [Service] | |
| User=root | |
| ExecStart=/bin/sh -ec '\ | |
| [ -x /usr/bin/wslinfo ] && [ "$(/usr/bin/wslinfo --networking-mode)" = "mirrored" ] || exit 0;\ | |
| echo "\ | |
| add chain ip nat WSLPREROUTING { type nat hook prerouting priority dstnat - 1; policy accept; };\ |