๐Ÿ’ฉ ์—๋Ÿฌ ํ•ด๊ฒฐ

[PyTorch/์—๋Ÿฌ ํ•ด๊ฒฐ] PyTorch-Tensorboard์™€ libprotobuf ๋ฌธ์ œ

๋ณต๋งŒ 2021. 10. 16. 17:22

๋ฉ€์ฉกํ•˜๊ฒŒ ์ž˜ ๋Œ์•„๊ฐ€๋˜ ์ฝ”๋“œ๊ฐ€ ๊ฐ‘์ž๊ธฐ ์•Œ ์ˆ˜ ์—†๋Š” ์—๋Ÿฌ๊ฐ€ ๋‚˜๋ฉด์„œ ์‹คํ–‰์ด ์•ˆ๋๋‹ค..

 

 

============================================================================

[libprotobuf FATAL ../3rdparty/protobuf/src/google/protobuf/stubs/common.cc:68] This program requires version 3.8.0 of the Protocol Buffer runtime library, but the installed version is 3.5.1. Please update your library. If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers as your link-time library. (Version verification failed in "bazel-out/k8-opt/bin/tensorflow/core/framework/tensor_shape.pb.cc".)
terminate called after throwing an instance of 'google::protobuf::FatalException'
what(): This program requires version 3.8.0 of the Protocol Buffer runtime library, but the installed version is 3.5.1. Please update your library. If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers as your link-time library. (Version verification failed in "bazel-out/k8-opt/bin/tensorflow/core/framework/tensor_shape.pb.cc".)
Aborted (core dumped)

============================================================================

 

 

protobuf๋ผ๋Š” Python package์˜ ๋ฌธ์ œ์ธ๊ฑด๊ฐ€ ์‹ถ์–ด์„œ ๋ฒ„์ „์„ ํ™•์ธํ•ด ๋ดค์ง€๋งŒ ..

์˜ค๋ฅ˜ ๋ฉ”์„ธ์ง€์—์„œ๋Š” 3.8.0 ์ด์ƒ์˜ version์ด ํ•„์š”ํ•œ๋ฐ, ์„ค์น˜๋œ version์€ ๊ทธ๋ณด๋‹ค ๋‚ฎ๋‹ค๊ณ  ํ•œ ๊ฒƒ ๊ฐ™์€๋ฐ

์‹ค์ œ๋กœ ์„ค์น˜๋œ version์€ 3.13.0์ด์˜€๋‹ค. ์ €๊ฑฐ ๋ง๊ณ  ๋‹ค๋ฅธ ๊ณณ์—์„œ ๋ถˆ๋Ÿฌ์™€์„œ ์‚ฌ์šฉํ•˜๋Š” ๋“ฏ ํ•œ๋ฐ.. ์ž˜ ๋ชจ๋ฅด๊ฒ ์Œ

 

๊ทธ๋Ÿฐ๋ฐ ์—๋Ÿฌ ๋ฉ”์„ธ์ง€๋ฅผ ๋‹ค์‹œ ๋ณด๋‹ˆ.. Tensorflow์™€ ๊ด€๋ จ๋œ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•œ ๊ฒƒ ๊ฐ™์€๋ฐ ๋‚˜๋Š” PyTorch๋งŒ ์‚ฌ์šฉํ•˜๋Š”๋ฐ ์ด๊ฒŒ ๋Œ€์ฒด ๋จผ ์ผ์ผ๊นŒ..

 

์ž˜ ์ƒ๊ฐํ•ด๋ณด๋‹ˆ Pytorch-Tensorboard๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ๋Š”๋ฐ ์—ฌ๊ธฐ์„œ ์—๋Ÿฌ๊ฐ€ ๋‚œ ๊ฒƒ ๊ฐ™์•˜๋‹ค.

๋””๋ฒ„๊น…์„ ํ•ด๋ณด๋‹ˆ ์‹ค์ œ๋กœ Tensorboard writer์„ ์ •์˜ํ•  ๋•Œ ์‹คํ–‰์ด ๋ฉˆ์ท„๋‹ค.

 

PyTorch๋ฅผ ์—…๊ทธ๋ ˆ์ด๋“œ ํ–ˆ๋Š”๋ฐ, ์—…๊ทธ๋ ˆ์ด๋“œ ํ•œ PyTorch์—์„œ ์‚ฌ์šฉํ•˜๋Š” Tensorboard๊ฐ€ ์ด์ „ ๋ฒ„์ „๋ณด๋‹ค ๋” ๋†’์€ protobuf๋ฅผ ์š”๊ตฌํ•˜๋Š”๋ฐ ๊ฐ™์ด ์—…๊ทธ๋ ˆ์ด๋“œ๊ฐ€ ์•ˆ๋œ๋“ฏ..

 

 

Trial 1. Tensorflow ๋ฒ„์ „ ์—…๊ทธ๋ ˆ์ด๋“œ

PyTorch๋ฅผ ๋‹ค์šด๊ทธ๋ ˆ์ด๋“œํ•  ์ˆ˜๋Š” ์—†์–ด์„œ.. Tensorflow๋ฅผ ์—…๊ทธ๋ ˆ์ด๋“œํ•˜๋ฉด ์ž˜ ๋˜์ง€ ์•Š์„๊นŒ? ์‹ถ์–ด์„œ ์—…๊ทธ๋ ˆ์ด๋“œ ํ•ด๋ดค๋Š”๋ฐ.. ๋˜‘๊ฐ™์€ ์—๋Ÿฌ๋งŒ ๋ฐœ์ƒํ–ˆ๋‹ค.

 

CUDA, driver, PyTorch + Tensorflow ํ˜ธํ™˜๋˜๋Š” version ์ฐพ๊ณ  ์„ค์น˜(์—…๊ทธ๋ ˆ์ด๋“œ, ๋‹ค์šด๊ทธ๋ ˆ์ด๋“œ)ํ•˜๊ธฐ

 

 

Trial 2. PyTorch ๋ฒ„์ „ ๋‹ค์šด๊ทธ๋ ˆ์ด๋“œ

๊ฒฐ๊ตญ ๊ทธ๋ƒฅ ์ง€์ณ์„œ .. PyTorch๋ฅผ ์›๋ž˜ ๋ฒ„์ „์œผ๋กœ ๋‹ค์šด๊ทธ๋ ˆ์ด๋“œ ํ–ˆ๋”๋‹ˆ์ž˜ ๋Œ์•„๊ฐ”๋‹ค.. ^_^

PyTorch-Tensorboard๊ฐ€ ์ฐธ์กฐํ•˜๋Š” protobuf์˜ ์œ„์น˜๋ฅผ ์ฐพ๊ณ  ์ž˜ ์—…๊ทธ๋ ˆ์ด๋“œํ•˜๋ฉด ๋˜์ง€ ์•Š์„๊นŒ .. ์‹ถ์—ˆ์ง€๋งŒ

์•„๋ฌด๋ฆฌ ์ฐพ์•„๋„ ๋‚˜์˜ค์งˆ ์•Š์•˜๋‹ค

 

Torchaudio๋ฅผ ์—…๊ทธ๋ ˆ์ด๋“œ ํ•ด์•ผ ํ•ด์„œ PyTorch๋„ ์—…๊ทธ๋ ˆ์ด๋“œ ํ•œ๊ฑด๋ฐ.. ๊ทธ๋ƒฅ ์•ˆ์“ฐ์ง€ ๋ญ...

๋ฐ˜์‘ํ˜•