影醉阏轩窗

衣带渐宽终不悔,为伊消得人憔悴。
扩大
缩小

工作小结五

1. RuntimeError: DataLoader worker (pid 18255) is killed by signal: Killed.

是因为数据在多个线程占据,当遇到线程之间冲突的时候就会出现这个情况,而且冲突的时候导致内存使用一直增加,最终奔溃啦。当使用CPU加载数据直接使用0即可,会直接分配线程。当使用GPU加载数据,指定线程数(不要超过24)。公司一个大佬和我说的,受益匪浅啊。

2. VScode 的Code Runner插件一直找不到modules

—> Settings
—> Extensions
—> Run code configure
—> Executor Map
—> Edit in setting.json
Python 环境要设置一下自动获取:"python": "$pythonPath $fullFileName",

{
    "code-runner.executorMap": {
        "javascript": "node",
        "java": "cd $dir && javac $fileName && java $fileNameWithoutExt",
        "c": "cd $dir && gcc $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
        "cpp": "cd $dir && g++ $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
        "objective-c": "cd $dir && gcc -framework Cocoa $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
        "php": "php",
        "python": "$pythonPath $fullFileName",
        //"/Users/wujinyi/opt/miniconda3/bin/python",
        "perl": "perl",
        "perl6": "perl6",
        "ruby": "ruby",
        "go": "go run",
        "lua": "lua",
        "groovy": "groovy",
        "powershell": "powershell -ExecutionPolicy ByPass -File",
        "bat": "cmd /c",
        "shellscript": "bash",
        "fsharp": "fsi",
        "csharp": "scriptcs",
        "vbscript": "cscript //Nologo",
        "typescript": "ts-node",
        "coffeescript": "coffee",
        "scala": "scala",
        "swift": "swift",
        "julia": "julia",
        "crystal": "crystal",
        "ocaml": "ocaml",
        "r": "Rscript",
        "applescript": "osascript",
        "clojure": "lein exec",
        "haxe": "haxe --cwd $dirWithoutTrailingSlash --run $fileNameWithoutExt",
        "rust": "cd $dir && rustc $fileName && $dir$fileNameWithoutExt",
        "racket": "racket",
        "scheme": "csi -script",
        "ahk": "autohotkey",
        "autoit": "autoit3",
        "dart": "dart",
        "pascal": "cd $dir && fpc $fileName && $dir$fileNameWithoutExt",
        "d": "cd $dir && dmd $fileName && $dir$fileNameWithoutExt",
        "haskell": "runhaskell",
        "nim": "nim compile --verbosity:0 --hints:off --run",
        "lisp": "sbcl --script",
        "kit": "kitc --run",
        "v": "v run",
        "sass": "sass --style expanded",
        "scss": "scss --style expanded"
    },
    "editor.fontSize": 14
}
``` python

posted on 2020-03-18 20:57  影醉阏轩窗  阅读(250)  评论(0编辑  收藏  举报

导航

/* 线条鼠标集合 */ /* 鼠标点击求赞文字特效 */ //带头像评论