質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
Keras

Kerasは、TheanoやTensorFlow/CNTK対応のラッパーライブラリです。DeepLearningの数学的部分を短いコードでネットワークとして表現することが可能。DeepLearningの最新手法を迅速に試すことができます。

CNN (Convolutional Neural Network)

CNN (Convolutional Neural Network)は、全結合層のみではなく畳み込み層とプーリング層で構成されるニューラルネットワークです。画像認識において優れた性能を持ち、畳み込みニューラルネットワークとも呼ばれています。

Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

Q&A

解決済

1回答

2768閲覧

# CIFAR10がロードできません

退会済みユーザー

退会済みユーザー

総合スコア0

Keras

Kerasは、TheanoやTensorFlow/CNTK対応のラッパーライブラリです。DeepLearningの数学的部分を短いコードでネットワークとして表現することが可能。DeepLearningの最新手法を迅速に試すことができます。

CNN (Convolutional Neural Network)

CNN (Convolutional Neural Network)は、全結合層のみではなく畳み込み層とプーリング層で構成されるニューラルネットワークです。画像認識において優れた性能を持ち、畳み込みニューラルネットワークとも呼ばれています。

Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

0グッド

0クリップ

投稿2021/07/16 05:20

[CNNを特徴量抽出器として扱う]こちらのサイトのプログラムをしたいのですが、CIFAR10をロードするところで、(https://qiita.com/DataSkywalker/items/6f5a8fafee82c195fa0b)

ERROR

1Downloading data from https://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz 2--------------------------------------------------------------------------- 3SSLCertVerificationError Traceback (most recent call last) 4/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py in do_open(self, http_class, req, **http_conn_args) 5 1349 h.request(req.get_method(), req.selector, req.data, headers, 6-> 1350 encode_chunked=req.has_header('Transfer-encoding')) 7 1351 except OSError as err: # timeout error 8 9/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py in request(self, method, url, body, headers, encode_chunked) 10 1276 """Send a complete request to the server.""" 11-> 1277 self._send_request(method, url, body, headers, encode_chunked) 12 1278 13 14/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py in _send_request(self, method, url, body, headers, encode_chunked) 15 1322 body = _encode(body, 'body') 16-> 1323 self.endheaders(body, encode_chunked=encode_chunked) 17 1324 18 19/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py in endheaders(self, message_body, encode_chunked) 20 1271 raise CannotSendHeader() 21-> 1272 self._send_output(message_body, encode_chunked=encode_chunked) 22 1273 23 24/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py in _send_output(self, message_body, encode_chunked) 25 1031 del self._buffer[:] 26-> 1032 self.send(msg) 27 1033 28 29/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py in send(self, data) 30 971 if self.auto_open: 31--> 972 self.connect() 32 973 else: 33 34/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py in connect(self) 35 1446 self.sock = self._context.wrap_socket(self.sock, 36-> 1447 server_hostname=server_hostname) 37 1448 38 39/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py in wrap_socket(self, sock, server_side, do_handshake_on_connect, suppress_ragged_eofs, server_hostname, session) 40 422 context=self, 41--> 423 session=session 42 424 ) 43 44/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py in _create(cls, sock, server_side, do_handshake_on_connect, suppress_ragged_eofs, server_hostname, context, session) 45 869 raise ValueError("do_handshake_on_connect should not be specified for non-blocking sockets") 46--> 870 self.do_handshake() 47 871 except (OSError, ValueError): 48 49/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py in do_handshake(self, block) 50 1138 self.settimeout(None) 51-> 1139 self._sslobj.do_handshake() 52 1140 finally: 53 54SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1091) 55 56During handling of the above exception, another exception occurred: 57 58URLError Traceback (most recent call last) 59/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/keras/utils/data_utils.py in get_file(fname, origin, untar, md5_hash, file_hash, cache_subdir, hash_algorithm, extract, archive_format, cache_dir) 60 224 try: 61--> 225 urlretrieve(origin, fpath, dl_progress) 62 226 except HTTPError as e: 63 64/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py in urlretrieve(url, filename, reporthook, data) 65 246 66--> 247 with contextlib.closing(urlopen(url, data)) as fp: 67 248 headers = fp.info() 68 69/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py in urlopen(url, data, timeout, cafile, capath, cadefault, context) 70 221 opener = _opener 71--> 222 return opener.open(url, data, timeout) 72 223 73 74/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py in open(self, fullurl, data, timeout) 75 524 76--> 525 response = self._open(req, data) 77 526 78 79/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py in _open(self, req, data) 80 542 result = self._call_chain(self.handle_open, protocol, protocol + 81--> 543 '_open', req) 82 544 if result: 83 84/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py in _call_chain(self, chain, kind, meth_name, *args) 85 502 func = getattr(handler, meth_name) 86--> 503 result = func(*args) 87 504 if result is not None: 88 89/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py in https_open(self, req) 90 1392 return self.do_open(http.client.HTTPSConnection, req, 91-> 1393 context=self._context, check_hostname=self._check_hostname) 92 1394 93 94/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py in do_open(self, http_class, req, **http_conn_args) 95 1351 except OSError as err: # timeout error 96-> 1352 raise URLError(err) 97 1353 r = h.getresponse() 98 99URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1091)> 100 101During handling of the above exception, another exception occurred: 102 103Exception Traceback (most recent call last) 104/var/folders/72/fl6l29ds4xvbv0zcgdzj4wc00000gn/T/ipykernel_42162/2826682693.py in <module> 105 1 # CIFAR10をロード 106----> 2 (X_train,y_train),(X_test, y_test) = cifar10.load_data() 107 108/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/keras/datasets/cifar10.py in load_data() 109 20 dirname = 'cifar-10-batches-py' 110 21 origin = 'https://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz' 111---> 22 path = get_file(dirname, origin=origin, untar=True) 112 23 113 24 num_train_samples = 50000 114 115/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/keras/utils/data_utils.py in get_file(fname, origin, untar, md5_hash, file_hash, cache_subdir, hash_algorithm, extract, archive_format, cache_dir) 116 227 raise Exception(error_msg.format(origin, e.code, e.msg)) 117 228 except URLError as e: 118--> 229 raise Exception(error_msg.format(origin, e.errno, e.reason)) 119 230 except (Exception, KeyboardInterrupt): 120 231 if os.path.exists(fpath): 121 122Exception: URL fetch failure on https://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz : None -- [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1091)

このようなエラーが出てしまいます。
調べてもわからないので教えてください。
お願い致します。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

退会済みユーザー

退会済みユーザー

2021/07/26 08:05

遅くなってしまい申し訳ございません。 そちらのサイトに書かれているのを入れたらできました! ありがとうございます。 また、回答していただけると幸いです。
guest

回答1

0

ベストアンサー

投稿2021/07/26 09:15

jbpb0

総合スコア7651

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問