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

Function createDummyModel

tfjs-layers/src/engine/training_test.ts:2221–2229  ·  view source on GitHub ↗
(inputSize: number)

Source from the content-addressed store, hash-verified

2219
2220describeMathGPU('LayersModel.fit: yieldEvery', () => {
2221 function createDummyModel(inputSize: number): tfl.LayersModel {
2222 const model = tfl.sequential();
2223 const layerSize = 10;
2224 model.add(tfl.layers.dense(
2225 {units: layerSize, inputShape: [inputSize], activation: 'relu'}));
2226 model.add(tfl.layers.dense({units: 1}));
2227 model.compile({loss: 'meanSquaredError', optimizer: 'sgd'});
2228 return model;
2229 }
2230
2231 it('auto: 1 batch per epoch; 5 epochs', async () => {
2232 const wait = DEFAULT_YIELD_EVERY_MS;

Callers 1

training_test.tsFile · 0.70

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…