-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Description
Describe the problem or feature request
I'm trying to save my model in a file with Angular 6. I expected it to work just like a normal Node.js project but I get these errors:
WARNING in ./node_modules/bindings/bindings.js 81:22-40 Critical dependency: the request of a dependency is an expression
WARNING in ./node_modules/bindings/bindings.js 81:43-53 Critical dependency: the request of a dependency is an expression
WARNING in ./node_modules/@tensorflow/tfjs-core/dist/tf-core.esm.js Module not found: Error: Can't resolve 'crypto' in '/Users/jonas/Projects/ML/tfjs-test/ng-tfjs-mobilenet-extend/node_modules/@tensorflow/tfjs-core/dist'
ERROR in ./node_modules/@tensorflow/tfjs-node/dist/io/file_system.js Module not found: Error: Can't resolve 'fs' in '/Users/jonas/Projects/ML/tfjs-test/ng-tfjs-mobilenet-extend/node_modules/@tensorflow/tfjs-node/dist/io'
ERROR in ./node_modules/bindings/bindings.js Module not found: Error: Can't resolve 'fs' in '/Users/jonas/Projects/ML/tfjs-test/ng-tfjs-mobilenet-extend/node_modules/bindings'
ERROR in ./node_modules/@tensorflow/tfjs-node/dist/io/file_system.js Module not found: Error: Can't resolve 'path' in '/Users/jonas/Projects/ML/tfjs-test/ng-tfjs-mobilenet-extend/node_modules/@tensorflow/tfjs-node/dist/io'
ERROR in ./node_modules/bindings/bindings.js Module not found: Error: Can't resolve 'path' in '/Users/jonas/Projects/ML/tfjs-test/ng-tfjs-mobilenet-extend/node_modules/bindings'
Code to reproduce the bug / link to feature request
This is my code:
import { Component } from '@angular/core';
import * as tf from '@tensorflow/tfjs';
import '@tensorflow/tfjs-node';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'app';
constructor() {
const model = tf.sequential();
model.add(tf.layers.dense({units: 1, inputShape: [1]}));
}
}
benmed00
Metadata
Metadata
Assignees
Labels
No labels