Google News
logo
TensorFlow.js - Interview Questions
What is Visor in TensorFlow.js?
* TensorFlow Visor is a graphic tools for visualizing Machine Learning
* Often called tfjs-vis
* It contains functions for visualizing TensorFlow Models
* Visualizations can be organized in Visors (modal browser windows)
* Can be used with Custom Tools likes d3, Chart.js, and Plotly.js
 
 
Using tfjs-vis : To use tfjs-vis, add the following script tag to your HTML file(s):
 
Example :
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-vis"></script>
 
Example with a Visor : 
<!DOCTYPE html>
<html>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-vis"></script>
<body>

<h2>TensorFlow Visor</h2>

<script>

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);

</script>
</body>
</html>

Output : 
Visor

Advertisement