move all layer params into attrs object

This commit is contained in:
Leon Chen
2016-09-18 23:20:59 -04:00
parent b1af2a7751
commit fd20f1b7b1
47 changed files with 285 additions and 162 deletions
+4 -4
View File
@@ -15,7 +15,7 @@ describe('convolutional layer: UpSampling3D', function () {
it(`[convolutional.UpSampling3D.0] size 2x2x2 upsampling on 2x2x2x3 input, dimOrdering=tf`, function () {
const key = `convolutional.UpSampling3D.0`
console.log(`\n%c[${key}] size 2x2x2 upsampling on 2x2x2x3 input, dimOrdering=tf`, styles.h3)
let testLayer = new layers.UpSampling3D([2, 2, 2], { dimOrdering: 'tf' })
let testLayer = new layers.UpSampling3D({ size: [2, 2, 2], dimOrdering: 'tf' })
let t = new KerasJS.Tensor(TEST_DATA[key].input.data, TEST_DATA[key].input.shape)
console.log('%cin', styles.h4, stringifyCondensed(t.tensor))
const startTime = performance.now()
@@ -32,7 +32,7 @@ describe('convolutional layer: UpSampling3D', function () {
it(`[convolutional.UpSampling3D.1] size 2x2x2 upsampling on 2x2x2x3 input, dimOrdering=th`, function () {
const key = `convolutional.UpSampling3D.1`
console.log(`\n%c[${key}] size 2x2x2 upsampling on 2x2x2x3 input, dimOrdering=th`, styles.h3)
let testLayer = new layers.UpSampling3D([2, 2, 2], { dimOrdering: 'th' })
let testLayer = new layers.UpSampling3D({ size: [2, 2, 2], dimOrdering: 'th' })
let t = new KerasJS.Tensor(TEST_DATA[key].input.data, TEST_DATA[key].input.shape)
console.log('%cin', styles.h4, stringifyCondensed(t.tensor))
const startTime = performance.now()
@@ -49,7 +49,7 @@ describe('convolutional layer: UpSampling3D', function () {
it(`[convolutional.UpSampling3D.2] size 1x3x2 upsampling on 2x1x3x2 input, dimOrdering=tf`, function () {
const key = `convolutional.UpSampling3D.2`
console.log(`\n%c[${key}] size 1x3x2 upsampling on 2x1x3x2 input, dimOrdering=tf`, styles.h3)
let testLayer = new layers.UpSampling3D([1, 3, 2], { dimOrdering: 'tf' })
let testLayer = new layers.UpSampling3D({ size: [1, 3, 2], dimOrdering: 'tf' })
let t = new KerasJS.Tensor(TEST_DATA[key].input.data, TEST_DATA[key].input.shape)
console.log('%cin', styles.h4, stringifyCondensed(t.tensor))
const startTime = performance.now()
@@ -66,7 +66,7 @@ describe('convolutional layer: UpSampling3D', function () {
it(`[convolutional.UpSampling3D.3] 2x1x2 upsampling on 2x1x3x3 input, dimOrdering=th`, function () {
const key = `convolutional.UpSampling3D.3`
console.log(`\n%c[${key}] 2x1x2 upsampling on 2x1x3x3 input, dimOrdering=th`, styles.h3)
let testLayer = new layers.UpSampling3D([2, 1, 2], { dimOrdering: 'th' })
let testLayer = new layers.UpSampling3D({ size: [2, 1, 2], dimOrdering: 'th' })
let t = new KerasJS.Tensor(TEST_DATA[key].input.data, TEST_DATA[key].input.shape)
console.log('%cin', styles.h4, stringifyCondensed(t.tensor))
const startTime = performance.now()