Search Results: getting started with python (93)

Learn SAS
Rick Wicklin 0
What is a CAS-enabled procedure?

I attended a seminar last week whose purpose was to inform SAS 9 programmers about SAS Viya. I could tell from the programmer's questions that some programmers were confused about three basic topics: What are the computing environments in Viya, and how should a programmer think about them? What procedures

Advanced Analytics | Analytics | Machine Learning
Sophia Rowland 0
SAS and R Integration for Machine Learning

SAS Viya is a cloud-enabled, in-memory analytics engine which allows for rapid analytics insights. Viya utilizes the SAS Cloud Analytics Services (CAS) to perform various actions and tasks. Best of all, CAS is accessible from various interfaces including R. In this blog, I will go through a few blocks one of my notebooks, which moves through an analytics workflow using R and SAS.

Artificial Intelligence
DLPyを使用した、ディープラーニングのfunctional APIモデル構築

SAS Viyaの分析機能をPythonから利用するためのハイレベルAPIパッケージであるDLPyでは、kerasと同等の簡潔なコーディングで、複雑な画像処理やディープラーニングを実行することができます。 そして、DLPyでは、kerasと同様に、2つの手法でディープラーニングのモデルを構築することができます。 Sequential modelとfunctional API modelです。 Sequentialとは、その名の通り、レイヤーを順序通りに積み重ねて、順序通りに実行していくモデルです。 以下は、DLPyを用いて、PythonからSAS Viyaのディープラーニング機能を使用して画像分類向けsequential modelのネットワークを定義している例です。 In [10]: model1 = Sequential(sess, model_table='Simple_CNN') model1.add(InputLayer(3, 224, 224, offsets=tr_img.channel_means)) model1.add(Conv2d(8, 7)) model1.add(Pooling(2)) model1.add(Conv2d(8, 7)) model1.add(Pooling(2)) model1.add(Dense(16)) model1.add(OutputLayer(act='softmax', n=2)) In [11]: model1.print_summary() Out[11]: In [12]: model1.plot_network() Out[12]: 一方、functional APIは、sequentialでは、表現することが難しい、より複雑な構造のモデルを構築する際に利用されます。 以下は、kerasの公式サイトに記載されている文面です。 “functional APIは,複数の出力があるモデルや有向非巡回グラフ,共有レイヤーを持ったモデルなどの複雑なモデルを定義するためのインターフェースです.” そして、DLPyでは、kerasと同様にsequential modelだけでなく、functional API modelの構築も可能になっています。 以下はその一例として、複数の入力と出力を持つような画像分類のためのディープラーニングモデルのネットワーク例です。 まず、テンソルオブジェクトを返すInput()によって、2つのテンソル、グレースケール画像とカラー(RGB)画像、を定義します。 グレースケール画像は2つの畳み込み層に送り込まれます。カラー画像はそれらとは別の畳み込み層に送り込まれます。