Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use Tensorboard With Tensorflow.js

I would like to use tensorboard to visualize my model fitting.

The instructions for the tensorboard tutorial (which is for python) and in the API docs (JS) use tf.node.

But tf.node does not exist.

TypeError: Cannot read property 'summaryFileWriter' of undefined

My code:

require('@tensorflow/tfjs-node');
console.clear();
require('dotenv').config();
const debugTf = require('debug')('tf');
const debugTfVerbose = require('debug')('tf:verbose');
const tf = require('@tensorflow/tfjs');
const summaryWriter = tf.node.summaryFileWriter('/tmp/tfjs_tb_logdir');

I'm using "@tensorflow/tfjs-node": "^1.2.3"

like image 455
Andi Giga Avatar asked Oct 22 '25 09:10

Andi Giga


1 Answers

According to the documentation, the namespace tf should be associated to the package tfjs-node instead of tf

const tf = require('@tensorflow/tfjs-node');
like image 109
edkeveked Avatar answered Oct 25 '25 06:10

edkeveked