MCPcopy
hub / github.com/tensorflow/tfjs / createModelForTest

Function createModelForTest

tfjs-node/src/tensorboard_test.ts:230–238  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

228 });
229
230 function createModelForTest(): tfn.LayersModel {
231 const model = tfn.sequential();
232 model.add(
233 tfn.layers.dense({units: 5, activation: 'relu', inputShape: [10]}));
234 model.add(tfn.layers.dense({units: 1}));
235 model.compile(
236 {loss: 'meanSquaredError', optimizer: 'sgd', metrics: ['MAE']});
237 return model;
238 }
239
240 it('fit(): default epoch updateFreq, with validation', async () => {
241 const model = createModelForTest();

Callers 1

Calls 2

addMethod · 0.65
compileMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…