TensorFlow.js Visor
- TensorFlow Visor သည် Machine Learning ကို ပုံဖော်ရန်အတွက် ဂရပ်ဖစ်ကိရိယာတစ်ခုဖြစ်သည်။
- ၎င်းတွင် TensorFlow မော်ဒယ်များ ကို မြင်ယောင်ရန် လုပ်ဆောင်ချက်များ ပါရှိသည်။
- Visors (modal browser windows) တွင် Visualization များကို စီစဉ်နိုင်သည်။
- d3၊ Chart.js နှင့် Plotly.js တို့ကဲ့သို့ စိတ်ကြိုက် တူးလ်များ ဖြင့် အသုံးပြုနိုင်သည်။
- မကြာခဏ tfjs-vis ဟုခေါ်သည်။
tfjs-vis ကိုအသုံးပြုခြင်း။
tfjs-vis ကိုအသုံးပြုရန်၊ သင်၏ HTML ဖိုင်(များ)သို့ အောက်ပါ script tag ကိုထည့်ပါ-
ဥပမာ
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-vis"></script>
ကွက်ကျားကွက်များ
ဥပမာ
const surface = document.getElementById('demo');
const series = ['First', 'Second'];
const serie1 = [];
const serie2 = [];
for (let i = 0; i < 100; i++) {
serie1[i] = {x:i, y:Math.random() * 100};
serie2[i] = {x:i, y:Math.random() * 100};
}
const data = {values: [serie1, serie2], series}
tfvis.render.scatterplot(surface, data);
Visor (ပုံစံဘရောက်ဆာဝင်းဒိုး) တွင် Visualization များကို စီစဉ်နိုင်သည်။
Visor နှင့် ဥပမာ
const series = ['First', 'Second'];
const serie1 = [];
const serie2 = [];
for (let i = 0; i < 100; i++) {
serie1[i] = {x:i, y:Math.random() * 100};
serie2[i] = {x:i, y:Math.random() * 100};
}
const data = {values: [serie1, serie2], series}
tfvis.render.scatterplot({name: "my Plots"}, data);
ဘားဂရပ်ဖစ်များ
ဥပမာ
const surface = document.getElementById('demo');
const data = [
{index: 0, value: 100},
{index: 1, value: 200},
{index: 2, value: 150},
{index: 2, value: 250},
];
tfvis.render.barchart(surface, data);
Visor (ပုံစံဘရောက်ဆာဝင်းဒိုး) တွင် Visualization များကို စီစဉ်နိုင်သည်။
Visor နှင့် ဥပမာ
const data = [
{index: 0, value: 100},
{index: 1, value: 200},
{index: 2, value: 150},
{index: 2, value: 250},
];
tfvis.render.barchart({name:"my Graphs"}, data);
မျဉ်းဂရပ်များ
ဥပမာ
const surface = document.getElementById('demo');
let values = [
{x: 1, y: 20},
{x: 2, y: 30},
{x: 3, y: 5},
{x: 4, y: 12}
];
tfvis.render.linechart(surface, {values});
Visor (ပုံစံဘရောက်ဆာဝင်းဒိုး) တွင် Visualization များကို စီစဉ်နိုင်သည်။
Visor နှင့် ဥပမာ
let values = [
{x: 1, y: 20},
{x: 2, y: 30},
{x: 3, y: 5},
{x: 4, y: 12}
];
tfvis.render.linechart({name: 'my Lines'}, {values});