Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The nodejs progress bar will wrap endlessly if outputs > placeholder length #1468

Closed
FremyCompany opened this issue Mar 29, 2019 · 0 comments · Fixed by tensorflow/tfjs-node#243
Assignees

Comments

@FremyCompany
Copy link
Contributor

TensorFlow.js version

1.0.2

Describe the problem or feature request

When the outputs on the right side of the sidebar exceed the size reserved for it in the template, the line wraps, and then the progress bar is redrawn at every step again.

There is a proposed fix for this in the library you use to draw the progress bar, but it would probably also be possible to work around it inside tensorflow by ensuring the name of the placeholder is padded so it is long enough to cover the expected size of its replacement.

visionmedia/node-progress#190

Code to reproduce the bug / link to feature request

    let input = tf.input({ shape: [max_len, recogized_letters.length] });
    let $ = tf.layers.flatten().apply(input);
    let $1 = tf.layers.dense({ name:"hi_this_is_the_first_model", units: 2}).apply($);
    let $2 = tf.layers.dense({ name:"hi_this_is_the_second_model", units: 2}).apply($);
    let model = tf.model({ inputs: [input], outputs: [ $1, $2 ] });

    model.compile({
        loss: 'meanSquaredError',
        optimizer: 'adam',
        metrics: ['acc']
    });

    await model.fit(xTrain, [yTrain,yTrain], {
        epochs: 2,
        batchSize: 1,
        validationSplit: 0.2,
    });
caisq added a commit to caisq/tfjs-node that referenced this issue Apr 5, 2019
1. Throttle render rate at 50 ms; previously it was 16 ms.
2. When metrics string is too long, cut it off to avoid constant
   line wrappig.
3. Adaptively set the threshold for metrics string length based on
   console width

Fixes tensorflow/tfjs#1468
caisq added a commit to tensorflow/tfjs-node that referenced this issue Apr 18, 2019
1. Throttle render rate at 50 ms; previously it was 16 ms.
2. When metrics string is too long, cut it off to avoid new lines being
   created constantly
3. Adaptively set the threshold for metrics string length based on
   console width
4. Avoid very long number strings (e.g., 0.0000000007) when
  a metric has a very small positive value.

Fixes tensorflow/tfjs#1468
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants