! ls -al *.h5에 대하여

22 views
Skip to first unread message

이석헌

unread,
Feb 21, 2021, 2:25:45 AM2/21/21
to 머신러닝/딥러닝 도서 Q&A
colab대신에 vscode를 사용하고 있습니다.
.ipynb 대신에 .py으로 바꾸어서 coding 연습을 하고 있습니다.
404 페이지의 !ls -al *.h5의 코딩은 .py로 변경하면 get_ipynb().system('ls -al  *.5')로 바뀌라고 나오는데  그대로 따라서 코딩을 하면  다음과 같은 에러가 나옵니다.

2021-02-21 16:08:08.899134: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1096] Device interconnect StreamExecutor with strength 1 edge matrix:
2021-02-21 16:08:08.899434: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1102]      0
2021-02-21 16:08:08.899657: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] 0:   N
2021-02-21 16:08:08.900102: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1241] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 4842 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1060 6GB, pci bus id: 0000:01:00.0, compute capability: 6.1)
2021-02-21 16:08:10.148545: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cublas64_10.dll
Traceback (most recent call last):
  File "c:/vsc/parkh/hg-mldl/7_3_ex.py", line 93, in <module>
    get_ipython().system('ls -al *.h5')
NameError: name 'get_ipython' is not defined
그래서 googling을 해서 from IPYthon import get_ipython
                                            get_ipython().system('ls -al  *.h5')이라고 코딩하면
다음과 같은 에러가 발생합니다.
2021-02-21 16:21:07.429165: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cublas64_10.dll
Traceback (most recent call last):
  File "c:/vsc/parkh/hg-mldl/7_3_ex.py", line 94, in <module>
    get_ipython().system('ls -al *.h5')
AttributeError: 'NoneType' object has no attribute 'system
어떻게 해야 하나요?

Haesun Park

unread,
Feb 21, 2021, 2:46:52 AM2/21/21
to 이석헌, 머신러닝/딥러닝 도서 Q&A
안녕하세요. 박해선입니다.
이 책은 주피터 노트북으로 실습을 권장합니다.
제가 vscode나 변환된 스크립트에 대한 지원을 하기는 어렵습니다.
vscode 커뮤니티에 문의를 해보시면 좋을 것 같습니다.
감사합니다!

2021년 2월 21일 (일) 오후 4:25, 이석헌 <seoghe...@gmail.com>님이 작성:
--
이 메일은 Google 그룹스 '머신러닝/딥러닝 도서 Q&A' 그룹에 가입한 분들에게 전송되는 메시지입니다.
이 그룹에서 탈퇴하고 더 이상 이메일을 받지 않으려면 ml-dl-book-qn...@googlegroups.com에 이메일을 보내세요.
웹에서 이 토론을 보려면 https://groups.google.com/d/msgid/ml-dl-book-qna/deb43189-70d8-4c55-a243-4891f4bee75cn%40googlegroups.com을(를) 방문하세요.
Reply all
Reply to author
Forward
0 new messages