You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
import { torch } from "js-pytorch"; const nn = torch.nn; class Transformer extends nn.Module { constructor(vocab_size, hidden_size, n_timesteps, n_heads, p) { super(); // Instantiate Transformer's Layers: this.embed = new nn.Embedding(vocab_size, hidden_size); this.pos_embed = new nn.PositionalEmbedding(n_timesteps, hidden_size); this.b1 = new nn.Block( hidden_size, hidden_size, n_heads, n_timeste
JavaScript で OpenAI の API を扱おうとした時に、公式から提供されているパッケージを利用できます。 OpenAI提供の API を利用する際は以下の 1つ目の「openai」が利用できたり、Azure版の API(Azure OpenAI Service の API)を使う場合は以下 2つ目の「@azure/openai」を利用できたりします。 ※ 後述しますが、「openai」のほうを Azure OpenAI Service用に使うこともできます ●openai - npm https://www.npmjs.com/package/openai ●@azure/openai - npm https://www.npmjs.com/package/@azure/openai これらの違いについて、少し見てみた結果をメモしておこうと思い、この記事を書きました。 とり
using System.Windows.Threading; Dispatcher.CurrentDispatcher.InvokeAsync(async () => { // いろいろな処理... // メッセージループを終了させる Dispatcher.CurrentDispatcher.BeginInvokeShutdown(DispatcherPriority.Normal); }); Dispatcher.Run(); WPF とか WinForms とかでは、フレームワークがすでにメッセージループを回しているので、自分で Dispatcher.Run() する必要はない。 JavaScript 自分で書く必要なし。 Python asyncio.run(最初に実行するasync関数)
OpenAI TTS(Text to Speech) を Node.js で試してみた 先日開催された OpenAI Dev Day で新たに発表された、テキストから音声を生成する OpenAI TTS (Text To Speech) API が面白そうだったので、早速ですが Node.js 環境で簡単に試してみました。 先日開催された OpenAI Dev Day では大幅な機能追加に加え、いくつかの新しい API も発表されました。 その中で、テキストから音声を生成する OpenAI TTS (Text To Speech) API が面白そうだったので、早速ですが簡単に試してみることに。 Text to speech の概要や、API の リファレンスは下記にあります。 Text to speech - OpenAI API Create speech - API Referenc
はじめに 吉川@広島です。 OpenAIの新機能が盛り上がっていますね! OpenAI DevDayで発表された様々な機能について、公式ドキュメントを見ながら少しだけ詳細を確認してみた | DevelopersIO いまのところ弊社記事はPythonコードが多い印象がありますので、いくつかの新規機能についてNode.js組である自分もサンプルコードを上げてみます。 環境 node v18.14.2 typescript 5.0.2 openai 4.16.1 [共通] OpenAIクライアントの初期化 openai パッケージをインストールします。 npm i openai クライアントを初期化します。 const openAi = new OpenAI({ apiKey: "xxxxxxxxxxxxxxxxxxxxxx", }); DALL·E 3 API [アップデート]DALL·E
Visualizing Data via Deno, TypeScript, and VegaLite in JupyterLab Deno brings TypeScript, JavaScript, npm, and ES Modules to Jupyter with an easy to install kernel. The Deno Kernel is the first language runtime with a builtin jupyter kernel. There’s no better time to get started with Deno than now. Once deno is installed, run the deno jupyter kernel installation: deno jupyter --unstable --install
The Long Animation Frames API is an alternative to the Long Tasks API which has been available in Chrome for some time now (since Chrome 58). As its name suggests, the Long Task API allows you to monitor for long tasks, which are tasks that occupy the main thread for 50 milliseconds or longer. Long tasks can be monitored using the PerformanceLongTaskTiming interface, with a PeformanceObserver: con
Typograms (short for typographic diagrams) is a lightweight image format (text/typogram) useful for defining simple diagrams in technical documentation, originally developed here. See it in action here: https://google.github.io/typograms/ Like markdown, typograms is heavily inspired by pre-existing conventions found in ASCII diagrams. A small set of primitives and rules to connect them is defined,
TL;DR I’ve been working on a WebGPU optimized inference and autograd library called webgpu-torch with an API that matches PyTorch. The goal is to run neural networks in the browser at speeds comparable to a Linux workstation. Many kernels have been implemented and its design is easily extensible. It’s available on NPM now and works in both the browser and Node.js! Neural Networks in the Browser Ni
数年前にちょっと話題になりましたが 「妖怪けむり」、製造終了してしまったのでもう売っていないそうですね。[1] あまり遊んだ記憶はないですが、もう無くなってしまったと聞くと少し寂しいものがあります。 TensorFlow.js の Hand Pose Detection を使ったら、Web ブラウザ上で動作する AR妖怪けむり 的なものが作れるんじゃなかろうか... とおもったのでちょっと試してみました 完成したものはこちら そもそも「妖怪けむり」とは...? 妖怪けむり、馴染みがない方も居られるかとおもうので一応。 ニコニコ大百科 - ようかいけむりとは 愛知県の堀商店が販売、小林商店が製造。 主な販路は駄菓子屋で、価格は1枚20円。 商品名は「ようかいけむり」「おばけけむり」「カードけむり」など。いずれも、力強い筆致で描かれたおどろおどろしい妖怪の絵が特徴。 紙製のカードに、パラフィン
Version 1.88 is now available! Read about the new features and fixes from March. 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 i
TensorFlow.jsの待望の入門書。TensorFlow.jsはGoogleが開発したオープンソースのJavaScriptライブラリです。JavaScriptで機械学習したければ選択肢はTensorFlow.jsだけと言っても過言ではありません。本書では、JavaScriptエンジニアやAIエキスパートを対象に、サンプルを使った実践的なアプローチでTensorFlow.jsの基礎から応用までを解説します。読者はウェブ開発者という立ち位置を変えずにJavaScriptとブラウザで学べます。JavaScriptでAIを活用しようと真剣に考えているエンジニアにお勧めです。 賞賛の声 序文 訳者まえがき まえがき 1章 AIは魔法 1.1 JavaScriptを用いたAIへの道 1.2 知能とは何か? 1.3 AIの歴史 1.4 ニューラルネットワーク 1.5 今日のAI 1.6 なぜTen
『初めてのTensorFlow.js ―JavaScriptで学ぶ機械学習』 Gant Laborde 著、あんどうやすし 訳 2022年6月29日発売予定 368ページ(予定) ISBN978-4-87311-993-9 定価3,960円(税込) TensorFlow.jsの待望の入門書。TensorFlow.jsはGoogleが開発したオープンソースのJavaScriptライブラリです。JavaScriptで機械学習したければ選択肢はTensorFlow.jsだけと言っても過言ではありません。本書では、JavaScriptエンジニアやAIエキスパートを対象に、サンプルを使った実践的なアプローチでTensorFlow.jsの基礎から応用までを解説します。読者はウェブ開発者という立ち位置を変えずにJavaScriptとブラウザで学べます。JavaScriptでAIを活用しようと真剣に考えて
ipyvizzu is an animated charting tool for Jupyter, Google Colab, Databricks, Kaggle and Deepnote notebooks among other platforms. ipyvizzu enables data scientists and analysts to utilize animation for storytelling with data using Python. It's built on the open-source JavaScript/C++ charting library Vizzu. There is a new extension of ipyvizzu, ipyvizzu-story with which the animated charts can be pr
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く