4

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"

1 Answer 1

2

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

const tf = require('@tensorflow/tfjs-node');
Sign up to request clarification or add additional context in comments.

1 Comment

I always thought the one require is to load the engine e.g. gpu or cpu and the other one is for the library. Was already wondering why I land on to diff. documentations from google. Thx

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.