[enforce fail at CPUAllocator.cpp:64] . DefaultCPUAllocator: can't allocate memory: you tried to allocate 191102976000 bytes. Error code 12 (Cannot allocate memory)
code
super(Autoencoder, self).__init__()
self.encoder = nn.Sequential(
CLIC
- 非可逆圧縮タスク
- 高解像度の画像が2000枚
- https://www.compression.cc/challenge/
MNIST
MNIST_fashion
MS COCO
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 glob | |
import shutil | |
def main(): | |
"""mkdir {1, 2, 3}""" | |
cam1_0= glob.glob("200603_1350_luc/Cam1*.jpg") | |
cam1_1 = glob.glob("200603_1446_luc/Cam1*.jpg") | |
cam2_0 = glob.glob("200603_1350_luc/Cam2*.jpg") | |
cam2_1 = glob.glob("200603_1446_luc/Cam2*.jpg") |
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
// expects txt is like "/@admin" and extract admin | |
const extractNameFromPathname = (txt: string) => { | |
// ref https://stackoverflow.com/questions/22454258/js-regex-string-validation-for-slug | |
const r = /\/@([A-Za-z0-9_-]{3,15})$/; | |
const res = txt.match(r); | |
if (!res) return ""; | |
return res[1]; | |
}; |
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 copy | |
class Hoge(): | |
def __init__(self): | |
self.aaa = {"abc":12} | |
def test(self): | |
abc = copy.deepcopy(self.aaa) | |
print(id(abc)) | |
print(id(self.aaa)) | |
abc["abc"] = 212 |
method | meaning |
---|---|
nil? | Rubyの標準メソッド。nilの場合のみtrueを返し、それ以外はfalseを返す。nilとfalseを判別したい場合などに、==演算子を使わずに書ける。 |
empty? | String や Array に実装されているメソッド。空の文字列や空の配列の場合にtrueを返す。nilに対して呼び出すとNoMethodErrorが発生する。 |
blank? | nil? or empty? のようなメソッド。nilまたは空のオブジェクトを判定できる。 |
present? | !blank? を実行するメソッド。unless hoge.blank? とするくらいなら、if hoge.present? としたほうがelsifも書けるしすっきり。 |
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
// <Route | |
// path={"/"} | |
// component={() => ( | |
// <> | |
// {state.session_id ? ( | |
// <LoginHeader | |
// pageTitle={state.pageTitle} | |
// username={state.username} | |
// imageURL={state.imageURL} |
docker run -it -p 1236:6666 -e PORT=6666 laser/helloworld-http:latest