前回はOpenAI APIを使ってチャットなどを試しましたが、Jupyter AIはOpenAI 以外にも様々なAPIに対応しています。 今回はHuggingFace Hubを使ってみます。 環境構築HuggingFace Hubの機能を使うにはhuggingface_hub、ipywidgets、pillowをインストールする必要があります。コンテナで用意します。
はじめに: 本講座は「機械学習ってなんか面倒くさそう」と感じている プログラマのためのものである。本講座では 「そもそも機械が『学習する』とはどういうことか?」 「なぜニューラルネットワークで学習できるのか?」といった 根本的な疑問に答えることから始める。 そのうえで「ニューラルネットワークでどのようなことが学習できるのか?」 という疑問に対する具体例として、物体認識や奥行き認識などの問題を扱う。 最終的には、機械学習のブラックボックス性を解消し、所詮は ニューラルネットワークもただのソフトウェアであり、 固有の長所と短所をもっていることを学ぶことが目的である。 なお、この講座では機械学習のソフトウェア的な原理を中心に説明しており、 理論的・数学的な基礎はそれほど厳密には説明しない。 使用環境は Python + PyTorch を使っているが、一度原理を理解してしまえば 環境や使用言語が
はじめに 2021年、Pythonで複数の暗号系ライブラリを開発してPyPIで公開してきました。その過程で、setuptools、flit、poetryと、幾つかのパッケージ管理をわたり歩き、GitHub上でのCI/CDも色々試す中で私的なべスプラが定まってきたので、2022年初に備忘録としてまとめておきます。 具体的には、pyenv、poetry、pre-commit、tox、GitHub Actions を活用し、低コストで(=なるべく自動で)、高品質のプロダクトをPyPIにデプロイする方法・設定を共有します。個別のツールの記事はよく目にするのですが、開発ライフサイクル全体をカバーする記事がなかなか無かったので。 開発環境の整備 - pyenvで複数のPythonバージョンでの開発環境を整備 パッケージ管理 - poetry/pyproject.tomlでの一元的なパッケージ管理 静的
東京大学がちょっとびっくりするくらいの超良質な教材を無料公開していたので、まとめました Python入門講座 東大のPython入門が無料公開されています。scikit-learnといった機械学習関連についても説明されています。ホントいいです Pythonプログラミング入門 東京大学 数理・情報教育研究センター: utokyo-ipp.github.io 東大のPython本も非常にオススメです Pythonによるプログラミング入門 東京大学教養学部テキスト: アルゴリズムと情報科学の基礎を学ぶ https://amzn.to/2oSw4ws Pythonプログラミング入門 - 東京大学 数理・情報教育研究センター Google Colabで学習出来るようになっています。練習問題も豊富です https://colab.research.google.com/github/utokyo-ip
PHPとPythonとRubyの連想配列のデータ構造がそれぞれ4〜5年ほど前に見直され、ベンチマークテストによっては倍以上速くなったということがありました。具体的には以下のバージョンで実装の大変更がありました。 PHP 7.0.0 HashTable高速化 (2015/11) Python 3.6.0 dictobject高速化 (2016/12) Ruby 2.4.0 st_table高速化 (2016/12) これらのデータ構造はユーザーの利用する連想配列だけでなく言語のコアでも利用されているので、言語全体の性能改善に貢献しています1。 スクリプト言語3つが同時期に同じデータ構造の改善に取り組んだだけでも面白い現象ですが、さらに面白いことに各実装の方針は非常に似ています。独立に改善に取り組んだのに同じ結論に至ったとすれば興味深い偶然と言えるでしょう2。 本稿では3言語の連想配列の従来実
こんにちは、AIチーム所属の@shidoです。CRE (Customer Reliability Engineering) 領域でMLを扱っています。 みなさんはPythonで本番コードを書くことについてどうお考えでしょうか。「研究/分析以外には使いたくない」「遅い」「動的型付け言語を本番用に使いたくない」といった声が聞こえてきそうです。 しかしながら機械学習サービス(または機械学習サービスのためのサービスなど)を作りたい場合、「学習に利用したPython用のライブラリを使用したい」「Pythonでやっていた分析と同じことを本番環境内でもやりたい」など、Pythonでバックエンドを実装したくなることがあると思います。 この記事ではtype hintsを付けながらPythonを書くことで、GoやJavaのようなサーバーサイドでよく使われる言語と可読性や保守性、場合によっては型安全性も同じレベ
こんにちは、けんにぃです。ナビタイムジャパンで公共交通の時刻表を使ったサービス開発やリリースフローの改善を担当しています。 今回は Python 製の Web フレームワークとして FastAPI を導入した話をしようと思います。 Python 製の Web フレームワークPython には代表的な Web フレームワークが 2 つあります。 ・Django: フルスタックフレームワーク ・Flask: マイクロフレームワーク Django は大規模開発向け、Flask は小中規模開発向けと言われますが、今回開発したサーバは小規模なサーバだったため、以前は Flask で開発していました。 しかし、どちらのフレームワークを使う場合でも下記のような機能を使おうとするとプラグインやサードパーティの助けを借りる必要があります。 ・OpenAPI ・JSON Schema ・GraphQL ・We
※実際記事で紹介する書籍は12冊ですが、メンバーが借りてオフィスになかったため、上記画像内に3冊ないものがあります。 はじめに AI Academyを開発・運営しています、株式会社エーアイアカデミー代表の谷です。 6ヶ月ほど前に書いた下記記事は約1200のいいねと7万viewsを超える記事になりました。 【保存版・初心者向け】独学でAIエンジニアになりたい人向けのオススメの勉強方法 お読み頂いた方々、またいいねして頂いた方々ありがとうございました! あれから6ヶ月ほど経ちまして、さらにPythonや機械学習の書籍が増えて参りましたので、改めて初心者向けにPythonと機械学習の良書12選を紹介し、初学者が独学でも機械学習プログラミングの基礎スキルUPに貢献できたらと思います。 また、AIプログラミングを作りながら学べるプログラミング学習サービスAI Academyを無料でご利用頂けますので
新しい言語に移行するのは常に大きな決断です。その言語をよく知る人がチームメンバーに1人しかいない時などは特にそうです。今年の初め、我々は Stream の主要言語を Python から Go に切り替えました。この記事では、なぜ私達が Python から Go に移行しようと決断したのか、その理由を説明します。 Go を使う理由 理由1 - パフォーマンス Go は速いです! Go は極端に速い。そのパフォーマンスは Java もしくは C++ に匹敵します。私達のユースケースでは、Go は Python より30倍速いです。Go と Java を比較したベンチマークはこちらです。 理由2 - 言語パフォーマンスの問題 多くのアプリケーションにとって、プログラミング言語は、単にアプリとデータベースを繋ぐものにすぎません。言語そのもののパフォーマンスは通常あまり重要ではありません。 しかしな
1カ月ほど前から、東京大学の松尾研のディープラーニング公開講座に行っている。 ネットで募集していたのであわてて申し込んだら、とんでもない数の人が集まっていて熱気がすごい。学部生、院生、社会人、あわせて300人以上が同時に授業を受けている。 初回こそ、人工知能概論のような話だったけれど、2回目以降はものすごい速度で授業が進む。そして宿題の量と質もすごい。2回と3回目の授業だけで、普通の学校の半年分くらいの内容になっている気がする。東大、ほんとにやべーよ。 毎回、授業の冒頭は「ふんふん、そうか」とはじまるのだけれど、終わり間近に大量のサンプルコードを見せられて、それをすごい勢いで説明され、最後にゴツイ宿題が出る。授業終了後は、ポカーンってなる(授業中にぜんぶ理解しているひと、どれくらいいるんだろう)。 友人の物書堂の社長の広瀬くん(iPhone辞書アプリ開発の大御所!)も、たまたまいっしょに講
【2020/1/9更新】2020年版もあります, こちらもよろしくおねがいします! 【2018/12/24追記】最新版を公開しました!「Python本まとめ・2019年版 - Webとデータ分析を初心者が仕事にするまで - Lean Baseball」 ※2017/12/24 最新版をこちらに上げました、この内容は古いのでこちらを見ていただけると幸いです🙇♂️ Pythonの学び方と,読むべき本を体系化しました2018〜初心者から上級者まで こんにちは.野球(とグルメ)の人です. 会社と仕事はメッチャ楽しいのですが,今日はそれと関係なくPythonの話題を久々に.*1 昨年から,「AI(えーあい)」だの「でぃーぷらーにんぐ」だの「機械学習」といったワードとともにPythonを覚えようとしている方が多いらしく, 何から学ぶべきか 何の本がオススメか 簡単に覚えて僕もいっちょ前に「えーあい
pythonの環境構築について "python 環境構築"でググると20万件くらいヒットしますが、割と内容が古いです。 タイトルにはデータサイエンティストと書いてありますが、データサイエンティスト以外にもanacondaはおすすめです。 2.x or 3.x? 3.xは動かないライブラリが多いので2.x推奨 > 3.xで動かないライブラリがある、くらいまで来ました。 easy_installでpipを入れて、setuptoolsも入れて、でもwheelというのもあって... > 古いです。 virtualenv 必須 > そんなこともないです。 winでは64bitは不具合が多いので32bit推奨 > 古いです。 winでは非公式バイナリからダウンロードしてインストール > お世話になりましたが、最近は使っていません。 2016版 OS毎python環境構築法決定版 Windows: an
この記事はトレタ Advent Calendar 2016の22日目です。 21日目はswdhの ActiveRecordオブジェクトを関連ごとシリアライズしてデシリアライズするでした。 スナップショット的にその時点のモデルを関連モデル含めて保存したい、っていう要望はBtoBやってると結構遭遇しますね。テーブルをちゃんと正規化すればするほど難しくなるやつなのでgem化されてるとありがたいです。 さて、この記事ではゼロから作るDeep Learning ―Pythonで学ぶディープラーニングの理論と実装を読んでpythonに入門するところから初めてニューラルネットワークを実際に実装して見た所感を記述します。平たく言えば読書感想文です。 ゼロから作るDeep Learning ―Pythonで学ぶディープラーニングの理論と実装 作者: 斎藤康毅出版社/メーカー: オライリージャパン発売日: 2
ディープラーニングの本格的な入門書。外部のライブラリに頼らずに、Python 3によってゼロからディープラーニングを作ることで、ディープラーニングの原理を楽しく学びます。ディープラーニングやニューラルネットワークの基礎だけでなく、誤差逆伝播法や畳み込みニューラルネットワークなども実装レベルで理解できます。ハイパーパラメータの決め方や重みの初期値といった実践的なテクニック、Batch NormalizationやDropout、Adamといった最近のトレンド、自動運転や画像生成、強化学習などの応用例、さらには、なぜディープラーニングは優れているのか? なぜ層を深くすると認識精度がよくなるのか? といった“Why”に関する問題も取り上げます。 関連ファイル サンプルコード 正誤表 ここで紹介する正誤表には、書籍発行後に気づいた誤植や更新された情報を掲載しています。以下のリストに記載の年月は、正
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く