목록2018/06/18 (2)
Knowledge Map
python2으로 json 파일 생성하기
아래와 같이 사용하면 그냥 json파일을 만들수 있다. import json json_data = {"one":1, "two":2, "three":3} with open('someData.json', 'w') as one_file: json.dump(json_data, one_file) Colored by Color Scriptercs
PYTHON
2018. 6. 18. 08:24
python2 multiprocessing 과 tensorflow
celery로 tensorflow를 실행시켜 비동기 백그라운드로 처리하려고 생각했었다. flask와 celery worker를 각각 실행한 다음 tensorflow의 메서드를 호출했을 때 다음과 같은 에러가 발생했다. tensorflow/stream_executor/cuda/cuda_driver.cc:1216] failed to enqueue async memcpy from host to device: CUDA_ERROR_NOT_INITIALIZED; GPU dst: 0x130a30d900; host src: 0x205c3d500; size: 4=0x4 검색을 하니 2017년도 즈음 되는 글이 나왔는데 버그였고 고쳤다고 했다. 하지만 난 이 에러가 발생했다.좀더 추가적으로 검색해보니 tf자체가 분산 연산..
PYTHON
2018. 6. 18. 07:26