Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [[package]] | |
| name = "atomicwrites" | |
| version = "1.4.0" | |
| description = "Atomic file writes." | |
| category = "dev" | |
| optional = false | |
| python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" | |
| [[package]] | |
| name = "attrs" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class IDS(torch.utils.data.IterableDataset): | |
| def genxy(self): | |
| for _ in range(10): | |
| xs, ys = [], [] | |
| for batch_idx in range(5): | |
| xs.append(torch.zeros(2, 2) + batch_idx) | |
| ys.append(torch.tensor(batch_idx)) | |
| yield torch.stack(xs), torch.stack(ys) | |
| def __iter__(self): | |
| return iter(self.genxy()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| git checkout v0.5.0 | |
| python <<EOF | |
| import pickle | |
| import skorch | |
| import skorch.toy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: nuclei | |
| channels: | |
| - defaults | |
| dependencies: | |
| - appdirs=1.4.3=py36h28b3542_0 | |
| - asn1crypto=0.24.0=py36_0 | |
| - attrs=18.2.0=py36h28b3542_0 | |
| - automat=0.7.0=py36_0 | |
| - backcall=0.1.0=py36_0 | |
| - blas=1.0=mkl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import torch | |
| import pickle | |
| ts = [torch.ones(10, 20) + n for n in range(4)] | |
| diff = 0 | |
| with open('tensor.pickle', 'wb') as f: | |
| for t in ts: | |
| start = f.tell() | |
| torch.save(t, f) |