並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 38 件 / 38件

新着順 人気順

python args optional argumentの検索結果1 - 38 件 / 38件

  • 関数名、メソッド名、変数名でよく使う英単語のまとめ

    プログラミングをしていると関数名、メソッド名、変数名をどうするか悩みます。 ロジックより命名に時間を費やすこともざらにあります。翻訳したり、一般的な命名規則なのかいつも検索して大変です。 よく使うサイトの内容をコピってメモしておく 関数名とメソッド名の違いについて よく使う英単語のまえに、いつもごっちゃにして使っているけど、定義はこんな感じ 「関数」と「メソッド」の違い 似ているところ どちらも何か(引数)を入れると処理をして何か(戻り値)を返してくれます。 違うところ やってること自体は大差ありません。概念としては違います。 メソッドはオブジェクト指向で登場する用語で、オブジェクトの動作を定義したものです。 まずオブジェクトありきなのですね。一方の関数は、オブジェクト云々は関係ありません。 個人的な使い分け Java で登場する関数は「メソッド」です。C 言語で登場する関数は「関数」と呼

      関数名、メソッド名、変数名でよく使う英単語のまとめ
    • 2024年のPythonプログラミング - Uzabase for Engineers

      ソーシャル経済メディア「NewsPicks」で推薦や検索などのアルゴリズム開発をしている北内です。Pythonは頻繁に新機能や便利なライブラリが登場し、ベストプラクティスの変化が激しい言語です。そこで、2024年2月時点で利用頻度の高そうな新機能、ライブラリ、ツールなどを紹介したいと思います。 この記事では広く浅く紹介することに重点を置き、各トピックについては概要のみを紹介します。詳細な使用方法に関しては各公式サイト等での確認をおすすめします。なお、本記事ではOSとしてmacOSを前提としています。 環境構築 Pythonの環境構築はpyenvとPoetryの組み合わせがもっとも標準的でしょう。 以下の手順でpyenvとPythonをインストールできます。 brew install pyenv # Bashの場合 echo 'eval "$(pyenv init -)"' >> ~/.ba

        2024年のPythonプログラミング - Uzabase for Engineers
      • プロと読み解く Ruby 3.1 NEWS - クックパッド開発者ブログ

        技術部の笹田(ko1)と遠藤(mame)です。クックパッドで Ruby (MRI: Matz Ruby Implementation、いわゆる ruby コマンド) の開発をしています。お金をもらって Ruby を開発しているのでプロの Ruby コミッタです。 本日 12/25 に、ついに Ruby 3.1.0 がリリースされました(Ruby 3.1.0 リリース )。今年も Ruby 3.1 の NEWS.md ファイルの解説をします。NEWS ファイルとは何か、は以前の記事を見てください。 プロと読み解く Ruby 2.6 NEWS ファイル - クックパッド開発者ブログ プロと読み解くRuby 2.7 NEWS - クックパッド開発者ブログ プロと読み解くRuby 3.0 NEWS - クックパッド開発者ブログ 本記事は新機能を解説することもさることながら、変更が入った背景や苦労な

          プロと読み解く Ruby 3.1 NEWS - クックパッド開発者ブログ
        • 【全2回】AWS Lambda x FastAPIによるPythonモダンAPI開発のすゝめ 1 - RAKSUL TechBlog

          はじめに この記事を読んで得られること 対象読者 あまり説明しないこと 前提とするバージョン 参考となるレポジトリ 1. 開発環境の構築で使用したツール AWS Lambdaのコンテナサポートを採用 Poetry利用時に開発と本番環境の適切な管理でLambdaデプロイ問題を解決 Poetry利用時に起きた問題 Dockerfileを分けてデプロイできない問題を回避 Mutagen Composeを採用 Dockerの同期遅い問題 Mutagen Composeを利用 2. 開発で活用したPythonライブラリ パッケージ管理 Poetry Ryeも検討したものの採用せず ベースのライブラリ FastAPI Mangum Powertools for AWS Lambda リンター・フォーマッター Ruff Mypy 型アノテーション自動生成ツールの活用 Black テスト Pytest p

            【全2回】AWS Lambda x FastAPIによるPythonモダンAPI開発のすゝめ 1 - RAKSUL TechBlog
          • MCP Python SDK のドキュメント|npaka

            以下の記事が面白かったので、簡単にまとめました。 ・modelcontextprotocol/python-sdk 1. 概要「MCP」を使用すると、アプリケーションは標準化された方法でLLMにコンテキストを提供できます。これにより、コンテキストの提供とLLMとの実際のやり取りを分離できます。「Python SDK」はMCP仕様を完全に実装しており、以下のことが容易になります。 ・任意のMCPサーバに接続できるMCPクライアントの構築 ・リソース、プロンプト、ツールを公開するMCPサーバの作成 ・stdio、SSE、Streamable HTTPなどの標準トランスポートの使用 ・すべてのMCPプロトコルメッセージとライフサイクルイベントの処理 2. インストール2-1. PythonプロジェクトにMCPを追加Pythonプロジェクトの管理には「uv」が推奨されています。 (1) プロジェク

              MCP Python SDK のドキュメント|npaka
            • Generative UI 用に独自言語を利用する「OpenUI」でUIを構築 - Taste of Tech Topics

              FIFAワールドカップが終わりましたね。決勝が3連休中だったこともあり、時間を気にせず楽しめた大塚です。 さて今回は、GitHubのスター数が急増中の、OpenUIというGenerative UI用のライブラリを紹介します。 Generative UIは、チャットのなかでLLMにテキストだけでなくUIを生成させる、という考え方です。 Generative UIの分野はまだ黎明期にありますが、以前からある「json-render」や「A2UI」などと比べて、OpenUIにはどのような違いがあるのかを中心に見ていきます。 github.com 1. はじめに 1.1 Generative UIとは 1.2 OpenUIとは 1.3 OpenUIの位置づけ 2. 「Declarative generation」での従来方式の課題 3. OpenUI Langによる解決策 3.1 OpenUI用の

                Generative UI 用に独自言語を利用する「OpenUI」でUIを構築 - Taste of Tech Topics
              • How to create a Python package in 2022

                Photo by Claudio Schwarz on Unsplash. How to create a Python package? In order to create a Python package, you need to write the code that implements the functionality you want to put in your package, and then you need to publish it to PyPI. That is the bare minimum. Nowadays, you can also set up a variety of other things to make your life easier down the road: continuous testing of your package;

                  How to create a Python package in 2022
                • Why DRY is the most over-rated programming principle

                  I figured I'd kick off my new blog with the most click baity thing I could think of. I suspect any developer reading this is aware of the DRY principle because it is just so ubiquitous. If not though, you just need to know that it stands for "Don't Repeat Yourself" and is generally invoked when advising people to not copy and paste snippets of code all over the place and instead consolidate logic

                    Why DRY is the most over-rated programming principle
                  • The Roc Programming Language

                    Examples Roc is a young language. It doesn't even have a numbered release yet, just nightly builds! However, it can already be used for several things if you're up for being an early adopter— with all the bugs and missing features which come with that territory. Here are some examples of how it can be used today. Command-Line Interfaces main! = |args| Stdout.line!("Hello!") You can use Roc to crea

                    • wav2vec 2.0 を使って 手軽に音声認識モデルを触れるようになろう - NTT docomo Business Engineers' Blog

                      この記事は NTTコミュニケーションズ Advent Calendar 2021 の20日目の記事です。 はじめに こんにちは。プラットフォームサービス本部アプリケーションサービス部の是松です。 NTTコミュニケーションズでは自然言語処理、機械翻訳、音声認識・合成、要約、映像解析などのAI関連技術を活用した法人向けサービスを提供しています。(COTOHA シリーズ) NTTコミュニケーションズがこのようなAI関連技術を活用したサービスを展開する強みとして、 NTT研究所の研究成果が利用可能であること 自社の他サービスを利用しているお客様に対してシナジーのあるサービスを提案できること この2点が挙げられると思います。 実際に、私が担当している COTOHA Voice Insight は 通話音声テキスト化によってコンタクトセンターの業務効率化・高度化を実現するサービスなのですが、 NTT研

                        wav2vec 2.0 を使って 手軽に音声認識モデルを触れるようになろう - NTT docomo Business Engineers' Blog
                      • Golang Mini Reference 2022: A Quick Guide to the Modern Go Programming Language (REVIEW COPY)

                        Golang Mini Reference 2022 A Quick Guide to the Modern Go Programming Language (REVIEW COPY) Harry Yoon Version 0.9.0, 2022-08-24 REVIEW COPY This is review copy, not to be shared or distributed to others. Please forward any feedback or comments to the author. • feedback@codingbookspress.com The book is tentatively scheduled to be published on September 14th, 2022. We hope that when the release da

                        • Parsing SQL - Strumenta

                          The code for this tutorial is on GitHub: parsing-sql SQL is a language to handle data in a relational database. If you worked with data you have probably worked with SQL. In this article we will talk about parsing SQL. It is in the same league of HTML: maybe you never learned it formally but you kind of know how to use it. That is great because if you know SQL, you know how to handle data. However

                            Parsing SQL - Strumenta
                          • Kalyn: a self-hosting compiler for x86-64

                            Over the course of my Spring 2020 semester at Harvey Mudd College, I developed a self-hosting compiler entirely from scratch. This article walks through many interesting parts of the project. It’s laid out so you can just read from beginning to end, but if you’re more interested in a particular topic, feel free to jump there. Or, take a look at the project on GitHub. Table of contents What the pro

                            • Build AI-powered scripts with the fm CLI and Python SDK - WWDC26 - Videos - Apple Developer

                              Explore all the new ways to leverage Apple Foundation Models on macOS. The Foundation Models SDK for Python lets you integrate with popular tooling and evaluation packages in the Python ecosystem. Find out how to use the brand new fm command introduced in macOS 27 to streamline scripting, automate model workflows, and accelerate your development process. Chapters 0:00 - Introduction 1:22 - Introdu

                                Build AI-powered scripts with the fm CLI and Python SDK - WWDC26 - Videos - Apple Developer
                              • llama.cpp で CPU で LLM のメモ(2023/05/15 時点日本語もいけるよ)

                                C/C++ ベースで CPU で LLM が動く llama.cpp すご... 便利... pytorch + CUDA なんていらんかったんや... モデルロードも爆速です. 最近日本語も文字化けせず使える感じになってきました! 開発はかなりアクティブで, 機能がどんどん追加されたり, weight ファイルフォーマットも結構まだまだ変化する感じです. 本記事を 2023/05/15 より 2 週間以上経て読んだ方は, 一度 llama.cpp の git repo を見直しするとよいでしょう. 環境 Ryzen9 3950X + 128 GB mem Ubuntu 20.04 Python 3.10(conda で構築) ビルド CMake ファイルが用意されていますので, それでいけます. (ファイル数少ないので, 自前ビルドシステムに組み込むのも容易でしょう) デフォでは普通に

                                  llama.cpp で CPU で LLM のメモ(2023/05/15 時点日本語もいけるよ)
                                • Skills in OpenAI API

                                  Upload, manage, and attach reusable skills to hosted environments. Agent Skills let you upload and reuse versioned bundles of files in hosted and local shell environments. For the full reference, see the Skills documentation. What is a skill? A skill is a reusable bundle of files (instructions + scripts + assets), packaged as a folder and anchored by a required SKILL.md manifest. OpenAI copies tha

                                    Skills in OpenAI API
                                  • 0.10.0 Release Notes ⚡ The Zig Programming Language

                                    Tier 4 Support § Support for these targets is entirely experimental. If this target is provided by LLVM, LLVM may have the target as an experimental target, which means that you need to use Zig-provided binaries for the target to be available, or build LLVM from source with special configure flags. zig targets will display the target if it is available. This target may be considered deprecated by

                                    • A 2025 Survey of Rust GUI Libraries

                                      I did this in 2020 and then again in 2021, but I’m in the mood to look around again. Let’s look through Are We GUI Yet? and see what’s up these days. The task today is to have a text label and an input field that can change the text in the label. In React, for example, this is basically free: const Demo = () => { let [state, setState] = useState("Hello, world!"); return ( <div> <p>{state}</p> <inp

                                      • Dataflow with Python practical setup guide - LegalOn Technologies Engineering Blog

                                        こんにちは、LegalOn Technologies検索・推薦チームの志水です。 私たちのチームでは Elasticsearch へのデータのインデキシングをCloud PubSub を queue として挟んで非同期にしており、その処理にDataflowを活用しています。Dataflow(=Google managed Apache Beam) はサーバーレスでスケーラブルなデータ処理を得意としています。 Python を用いたDataflowの活用については、例えばこちらの記事が網羅的です。 この記事では似たような観点に加え、Docker上で動かす工夫やintegration testの工夫も合わせて書いていければと思います。 全体像 パッケージ構成 pyproject.toml (Poetry) Pipeline Integration test DoFnのテスト DirectRun

                                          Dataflow with Python practical setup guide - LegalOn Technologies Engineering Blog
                                        • prompts.chat - AI Prompts Community

                                          --- name: skill-creator description: Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations. license: Complete terms in LICENSE.txt --- # Skill Creator This skill provides guidance for creating effective skills. ## About Skills S

                                            prompts.chat - AI Prompts Community
                                          • Rust on MIPS64 Windows NT 4.0

                                            Introduction Some part of me has always been fascinated with coercing code to run in weird places. I scratch this itch a lot with my security research projects. These often lead me to writing shellcode to run in kernels or embedded hardware, sometimes with the only way being through an existing bug. For those not familiar, shellcode is honestly hard to describe. I don’t know if there’s a very form

                                              Rust on MIPS64 Windows NT 4.0
                                            • August 2021 (version 1.60)

                                              Update 1.60.1: The update addresses these issues. Update 1.60.2: The update addresses these issues. Downloads: Windows: x64 Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap Welcome to the August 2021 release of Visual Studio Code. There are many updates in this version that we hope you will like, some of the key highlights include: Automatic language detection - Programming l

                                                August 2021 (version 1.60)
                                              • はじめての自然言語処理 ELYZA 日本語 Llama 2 指示応答モデルのファインチューニングと vLLM での推論 | オブジェクトの広場

                                                今回は Elyza さんの日本語 Llama 2 指示応答モデルをファインチューニングし、vLLM にデプロイして高速に推論してみます。70 億パラメータモデルならギリギリ Tesla T4 x 1 の構成でも float16 で動かせるかと思ったのですが、どうだったでしょうか。vLLM には OpenAI 互換の API インタフェースも備えているので、ついでに LangChain からも接続してみたり。 1. はじめに 今回は Elyza さんが公開されている大規模指示応答言語モデルである、ELYZA-japanese-Llama-2-7b-fast-instruct1 をファインチューニングして vLLM で推論してみます。 そんな訳で今回あまり書くことがなく、動かし方だけサラっと書いて「動きましたー。では良いお年を~。」で締めることにします。 しかし、時代感覚無視の隔月連載でネタを

                                                  はじめての自然言語処理 ELYZA 日本語 Llama 2 指示応答モデルのファインチューニングと vLLM での推論 | オブジェクトの広場
                                                • What's New in Emacs 28.1?

                                                  Try Mastering Emacs for free! Are you struggling with the basics? Have you mastered movement and editing yet? When you have read Mastering Emacs you will understand Emacs. It’s that time again: there’s a new major version of Emacs and, with it, a treasure trove of new features and changes. Notable features include the formal inclusion of native compilation, a technique that will greatly speed up y

                                                  • Scala3の新機能紹介 - Adwaysエンジニアブログ

                                                    こんにちは、おかむです。 開発開始から8年。28,000件のコミット、7400件のPR、4100件のClosed issue… 5/14に、とうとうScala3.0.0がリリースされました。 Scala3では、最新の型理論とScala2での経験が反映されています。 Easy to use, learn, and scale 移行や学習のためのドキュメント、Scala3の新しいマクロの解説など、各種ドキュメントの充実化も行われています。 今回はScala3の新しい要素について紹介していきます。 ちなみにすべては紹介しきれないので大きめの機能に絞っています。 新しい文法 New Control Syntax (新しい制御構文) Optional Braces (括弧の省略) 型システム Intersection Type (交差型) Union Type (共用体型) Type Lambda

                                                      Scala3の新機能紹介 - Adwaysエンジニアブログ
                                                    • はじめての自然言語処理 Transformer 系モデルの推論高速化の検証 | オブジェクトの広場

                                                      今回は Transformer 系のモデル、具体的には BERT, T5, GPT の推論を高速化してみます。高速化手法として FasterTransformer, Torch-TensorRT, AWS Neuron を用い、素 の transfomers に比べ、どの程度速くなるか(ならないか)、利点・欠点を確認してみましょう。 1. はじめに 今回は Transformer 系のモデル、具体的には BERT, T5, GPT の推論を様々な技術を使って高速化してみます。 高速化の元ネタは Hugging Face の transformers1 縛りとして、素の transformers で推論する場合に比べ、 どの程度速くなるか(ならないか)見てみましょう。 推論を高速化する技術としては FasterTransfomer2, Torch-TensorRT3, AWS Neuron(

                                                        はじめての自然言語処理 Transformer 系モデルの推論高速化の検証 | オブジェクトの広場
                                                      • September 2022 (version 1.72)

                                                        Downloads: Windows: x64 Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap Update 1.72.1: The update addresses these security issues. Update 1.72.2: The update addresses these issues. Welcome to the September 2022 release of Visual Studio Code. There are many updates in this version that we hope you'll like, some of the key highlights include: Tool bar customization - Hide/show

                                                          September 2022 (version 1.72)
                                                        • OpenAssistant/oasst1 · Datasets at Hugging Face

                                                          'Jew' or 'rabbi'"},"role":{"kind":"string","value":"assistant"},"lang":{"kind":"string","value":"en"},"review_count":{"kind":"number","value":3,"string":"3"},"review_result":{"kind":"bool","value":true,"string":"true"},"deleted":{"kind":"bool","value":false,"string":"false"},"rank":{"kind":"number","value":1,"string":"1"},"synthetic":{"kind":"bool","value":false,"string":"false"},"model_name":{"ki

                                                            OpenAssistant/oasst1 · Datasets at Hugging Face
                                                          • clapの使い方まとめ - ぽよメモ

                                                            はじめに インストール 使い方 位置引数 エスケープされた位置引数 引数を取るオプション 引数を取らないオプション 環境変数と紐付ける 一つのフラグで複数の値を取る 排他オプション 候補から選択するオプション サブコマンド グローバルなオプション テスト おわりに はじめに clapとはRustのCLI引数をパースするためのクレートです。Pythonで言うところのargparse、Goで言うところのcobra/spf13のような立ち位置のクレートで、CLIツールの実装をする場合お世話になることが多いでしょう。 docs.rs 自分が実装時にclapでこれはどういうやり方をするのか、などを調べても日本語では網羅的な情報があまり出てきませんでした。自分のためのまとめを書いていたらそれなりの文量になったので公開することにしました。 実際の実装は以下のリポジトリにあります。 github.com

                                                              clapの使い方まとめ - ぽよメモ
                                                            • XML/HTMLに対してjq的な使い方ができるxq、xq-python、htmlqを試す - CLOVER🍀

                                                              これは、なにをしたくて書いたもの? 最近、特定のファイルフォーマットに対するjqの代替みたいなものを書いているのですが、あともうひとつだけ書いて終わりに しようかなと。 Markdownに対してjq的な使い方ができるmdq、mqを試す - CLOVER🍀 YAMLに対してjq的な使い方ができるyq(2種類)を試す - CLOVER🍀 メモとしてここまで書いてきてしまったので、ひとまずこのフォーマットまでやってしまいましょうと。 最後はXML/HTMLです。ざっと調べてみたところ、xq、xq-python、htmlqあたりがよいのかなと思ったのでメモしておきます。 xq xqは、XML/HTMLに対してフォーマットおよびコンテンツの抽出ができるCLIです。 GitHub - sibprogrammer/xq: Command-line XML and HTML beautifier an

                                                                XML/HTMLに対してjq的な使い方ができるxq、xq-python、htmlqを試す - CLOVER🍀
                                                              • 画像復元(DiffBIR,Python,PyTorch を使用)(Windows 上)

                                                                【要約】 DiffBIRは,画像復元の手法で,低品質な画像を高品質に復元する.Windows上でのインストールでは,TritonのインストールとDiffBIRのセットアップを行う.学習済みモデルを使用して,画像復元を行う.詳細は公式GitHubページで説明されている. 元画像と処理結果 【目次】 前準備 DiffBIR のインストール(Windows 上) DiffBIR の動作確認(Windows 上) DiffBIR を使う Python プログラムの実行(Windows 上) DiffBIR DiffBIRは画像復元の手法の一つである。 画像復元は、低品質または劣化した画像を元の高品質な状態に修復するタスクである。 このタスクでは、ノイズや歪みなどの複雑な問題に対処する必要がある。 DiffBIRは、2つの主要なステージから成り立っている。 最初のステージでは、画像復元が行われ、低品

                                                                • Mac製ZIPファイルの文字化け問題(解) - uepon日々の備忘録

                                                                  先日、Mac製ZIPファイルの文字化け問題について書きましたが、その後さらに調べていたところ、根本的な解決方法につながる情報を見つけました。 その結果、前回の記事で書いた「WindowsがUTF-8に対応していない」という理解は誤りだったことが判明しました🙇実際には、WindowsはUTF-8対応した実装されていました。 文面が「Windows、まだShift_JISに依存しているのかよ~」というものになっていたかもしれません。謹んでお詫びいたします。マジスマン🙇 済まないと思うだけでは良くないので、メモとして残しておきます。 自分で調べた「Mac製Zipファイルの文字化け問題」https://t.co/X8Per9AZXd 根が深いなと思ってもう少し調べたところ以下がヒットhttps://t.co/slSYclENdr WindowsもZipファイルにフラグがあれば文字化けしないとの

                                                                    Mac製ZIPファイルの文字化け問題(解) - uepon日々の備忘録
                                                                  • JupyterLab Changelog — JupyterLab 4.6.0a1 documentation

                                                                    JupyterLab Changelog# v4.5# JupyterLab 4.5 includes a number of new features (described below), bug fixes, and enhancements. This release is compatible with extensions supporting JupyterLab 4.0. Extension authors are encouraged to consult the Extension Migration Guide which lists deprecations and changes to the public API. Performance and windowing# The default windowing mode is now contentVisibil

                                                                    • June 2025 (version 1.102)

                                                                      Release date: July 9, 2025 Update 1.102.1: The update addresses these issues. Update 1.102.2: The update addresses these issues. Update 1.102.3: The update addresses these issues. Downloads: Windows: x64 Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap Welcome to the June 2025 release of Visual Studio Code. There are many updates in this version that we hope you'll like, some

                                                                        June 2025 (version 1.102)
                                                                      • The Roc Programming Language

                                                                        Examples Roc is a young language. It doesn't even have a numbered release yet, just alpha builds! However, it can already be used for several things if you're up for being an early adopter— with all the bugs and missing features which come with that territory. Here are some examples of how it can be used today. Command-Line Interfaces main! = |args| Stdout.line!("Hello!") You can use Roc to create

                                                                        • テンソル次元の整合性を静的検査するmypyプラグインを実装しようとした話 - NTT docomo Business Engineers' Blog

                                                                          この記事は、NTT docomo Business Advent Calendar 2025 7日目の記事です。 こんにちは。イノベーションセンターの加藤です。普段はコンピュータビジョンの技術開発やAI/機械学習(ML)システムの検証に取り組んでいます。 ディープラーニングの実装をしているときに、変数のshapeを管理するのはなかなか大変です。いつのまにか次元が増えていたり、想定外のshapeがやってきたりして実行時に落ちてしまった!というのは日常茶飯事だと思います。 こういった問題に対して静的解析で何とかできないかと試行錯誤した結果を共有します。 mypyプラグインを使うモチベーション mypyプラグインの作成 初期化 jaxtyping annotationを拾う テンソル作成関数を拾う テンソル計算 ここで限界が来た(Future work) 変数付きのshape記法 次元の四則演算

                                                                            テンソル次元の整合性を静的検査するmypyプラグインを実装しようとした話 - NTT docomo Business Engineers' Blog
                                                                          • Implementing a Toy Optimizer

                                                                            In this blog post I want to show the complete code (in Python3) of how a very simple optimizer for sequences of operations can work. These algorithms could be part of a (really simple) compiler, or a JIT. The architecture of the code in this blog post is very similar to that of the trace optimizer of the PyPy JIT: After a trace is produced, is is optimized before being sent to the machine code bac

                                                                            • はじめての自然言語処理 MixCSE による教師なし文章ベクトル生成 | オブジェクトの広場

                                                                              今回は教師なしの文章ベクトル化手法である MixCSE の検証です。教師なし学習ですから教師ありの手法よりは精度的に不利でしょうが、局面によっては役に立つケースもあるのでは?と試してみることに。公開されているコードは transformers ベースなのですが、今回は Colab の TPU で動かしてみたので、その方法も紹介しますね。 1. はじめに 今回は教師なしの文章ベクトル化手法である MixCSE1 の検証をしてみました。 本連載では文章ベクトル化のモデルとして、 Sentence BERT を取り上げたこと(第9回, 第18回)がありますが、品質の良いベクトルを生成する為には大量かつ良質の教師データが必要でした。 法律や特許のような特定領域に特化した文章を扱う局面では、対象領域の文書で学習したモデルを使いたいところですが、特定領域限定の都合良いデータはなかなか手に入りません。そ

                                                                                はじめての自然言語処理 MixCSE による教師なし文章ベクトル生成 | オブジェクトの広場
                                                                              1