Get started with tensorflow CDN
Apache-2.0 licensed
TensorFlow is an open-source machine learning platform for building and training models.
Tags:- WebGL
- Machine Learning
- Training
Stable version
Copied!
How to start using tensorflow CDN
// Include TensorFlow library from the CDN
const tf = document.createElement('script');
tf.src = 'https://cdn.cdnhub.io/tensorflow/4.17.0/tf.min.js';
document.head.appendChild(tf);
// Wait for TensorFlow to load
window.onTensorFlowLoad = () => {
// Create a Tensor from an array
const tensor1d = tf.tensor1d([1, 2, 3, 4]);
// Perform element-wise addition with another Tensor
const tensor2d = tf.tensor2d([[1, 2], [3, 4]]);
const result = tf.add(tensor1d, tensor2d);
// Print the result
result.print();
// Dispose of the tensors to free memory
tensor1d.dispose();
tensor2d.dispose();
result.dispose();
};
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
All versions
0.0.1
0.0.2
0.0.3
0.0.4
0.0.5
0.0.6
0.0.7
0.10.0
0.10.1
0.10.2
0.10.3
0.11.0
0.11.1
0.11.2
0.11.4
0.11.5
0.11.6
0.11.7
0.12.0
0.12.1
0.12.2
0.12.3
0.12.4
0.12.5
0.12.6
0.12.7
0.13.0
0.13.1
0.13.2
0.13.3
0.13.4
0.13.5
0.14.0
0.14.1
0.14.2
0.15.0
0.15.1
0.15.2
0.15.3
0.6.0
0.6.0-alpha7
0.6.1
0.7.0
0.8.0
0.9.0
0.9.1
1.0.0
1.0.0-alpha1
1.0.0-alpha2
1.0.0-alpha3
1.0.0-alpha4
1.0.0-alpha5
1.0.1
1.0.2
1.0.3
1.0.4
1.1.0
1.1.2
1.2.1
1.2.10
1.2.11
1.2.2
1.2.3
1.2.5
1.2.6
1.2.7
1.2.8
1.2.9
1.3.0
1.3.1
1.3.2
1.4.0
1.5.0
1.5.1
1.5.2
1.6.0
1.6.1
1.7.0
1.7.1
1.7.2
1.7.3
1.7.4
2.0.0
2.0.0-rc.1
2.0.0-rc.2
2.0.0-rc.2.1
2.0.0-r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