Skip to content

Commit 73b1cdd

Browse files
committed
v0.6.1
1 parent 7fd32f5 commit 73b1cdd

File tree

6 files changed

+201
-15
lines changed

6 files changed

+201
-15
lines changed

dist/tensorspace.cjs.js

Lines changed: 66 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21892,9 +21892,22 @@ function Reshape( config ) {
2189221892
this.actualHeight = undefined;
2189321893
this.actualDepth = undefined;
2189421894

21895+
this.depth = undefined;
21896+
2189521897
this.layerDimension = undefined;
2189621898
this.openFmCenters = undefined;
2189721899

21900+
this.lastLayer = undefined;
21901+
21902+
if ( config !== undefined &&
21903+
( config.targetShape !== undefined || config.shape !== undefined ) ) {
21904+
21905+
this.setReshapeType();
21906+
this.createActualLayer();
21907+
this.updateLayerMetric();
21908+
21909+
}
21910+
2189821911
}
2189921912

2190021913
Reshape.prototype = {
@@ -21945,10 +21958,14 @@ Reshape.prototype = {
2194521958
this.actualHeight = this.actualLayer.actualHeight;
2194621959
this.actualDepth = this.actualLayer.actualDepth;
2194721960

21961+
this.depth = this.actualLayer.depth;
21962+
2194821963
this.layerDimension = this.actualLayer.layerDimension;
2194921964

2195021965
this.openFmCenters = this.actualLayer.openFmCenters;
2195121966

21967+
this.lastLayer = this.actualLayer.lastLayer;
21968+
2195221969
},
2195321970

2195421971
/**
@@ -21997,6 +22014,13 @@ Reshape.prototype = {
2199722014

2199822015
setEnvironment: function( context, model ) {
2199922016

22017+
if ( this.actualLayer === undefined ) {
22018+
22019+
this.createActualLayer();
22020+
this.updateLayerMetric();
22021+
22022+
}
22023+
2200022024
this.actualLayer.setEnvironment( context, model );
2200122025

2200222026
},
@@ -22043,6 +22067,20 @@ Reshape.prototype = {
2204322067

2204422068
},
2204522069

22070+
translateLayer: function( targetCenter, translateTime ) {
22071+
22072+
this.actualLayer.translateLayer( targetCenter, translateTime );
22073+
22074+
},
22075+
22076+
apply: function( lastLayer ) {
22077+
22078+
this.actualLayer.apply( lastLayer );
22079+
22080+
this.updateLayerMetric();
22081+
22082+
},
22083+
2204622084
setShape: function( shape ) {
2204722085

2204822086
// Based on shape dimension, update proxy states.
@@ -22077,6 +22115,15 @@ Reshape.prototype = {
2207722115

2207822116
assemble: function() {
2207922117

22118+
this.setReshapeType();
22119+
22120+
this.actualLayer.assemble();
22121+
this.updateLayerMetric();
22122+
22123+
},
22124+
22125+
setReshapeType: function() {
22126+
2208022127
// If "setShape" has been called before, there is no need to check "shape" attribute or "targetShape" attribute in config.
2208122128

2208222129
if ( this.reshapeType === undefined ) {
@@ -22139,9 +22186,6 @@ Reshape.prototype = {
2213922186

2214022187
}
2214122188

22142-
this.actualLayer.assemble();
22143-
this.updateLayerMetric();
22144-
2214522189
}
2214622190

2214722191
};
@@ -31329,6 +31373,8 @@ function MergeProxy( operatorType, layerList, config ) {
3132931373
this.actualHeight = undefined;
3133031374
this.actualDepth = undefined;
3133131375

31376+
this.depth = undefined;
31377+
3133231378
this.layerDimension = undefined;
3133331379

3133431380
this.openFmCenters = undefined;
@@ -31373,6 +31419,8 @@ MergeProxy.prototype = {
3137331419
this.actualHeight = this.actualLayer.actualHeight;
3137431420
this.actualDepth = this.actualLayer.actualDepth;
3137531421

31422+
this.depth = this.actualLayer.depth;
31423+
3137631424
this.layerDimension = this.actualLayer.layerDimension;
3137731425

3137831426
this.openFmCenters = this.actualLayer.openFmCenters;
@@ -31420,6 +31468,14 @@ MergeProxy.prototype = {
3142031468

3142131469
setEnvironment: function( context, model ) {
3142231470

31471+
if ( this.actualLayer === undefined ) {
31472+
31473+
MergeValidator.validateDimension( this.layerList );
31474+
this.createActualLayer();
31475+
this.updateLayerMetric();
31476+
31477+
}
31478+
3142331479
this.actualLayer.setEnvironment( context, model );
3142431480

3142531481
},
@@ -31472,6 +31528,12 @@ MergeProxy.prototype = {
3147231528

3147331529
},
3147431530

31531+
translateLayer: function( targetCenter, translateTime ) {
31532+
31533+
this.actualLayer.translateLayer( targetCenter, translateTime );
31534+
31535+
},
31536+
3147531537
setShape: function( shape ) {
3147631538

3147731539
// make sure the input elements have the same dimension.
@@ -31863,7 +31925,7 @@ function Multiply( layerList, config ) {
3186331925

3186431926
}
3186531927

31866-
let version = "0.6.0";
31928+
let version = "0.6.1";
3186731929

3186831930
/**
3186931931
* @author syt123450 / https://github.com/syt123450

dist/tensorspace.dev.esm.js

Lines changed: 66 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22547,9 +22547,22 @@ function Reshape( config ) {
2254722547
this.actualHeight = undefined;
2254822548
this.actualDepth = undefined;
2254922549

22550+
this.depth = undefined;
22551+
2255022552
this.layerDimension = undefined;
2255122553
this.openFmCenters = undefined;
2255222554

22555+
this.lastLayer = undefined;
22556+
22557+
if ( config !== undefined &&
22558+
( config.targetShape !== undefined || config.shape !== undefined ) ) {
22559+
22560+
this.setReshapeType();
22561+
this.createActualLayer();
22562+
this.updateLayerMetric();
22563+
22564+
}
22565+
2255322566
}
2255422567

2255522568
Reshape.prototype = {
@@ -22600,10 +22613,14 @@ Reshape.prototype = {
2260022613
this.actualHeight = this.actualLayer.actualHeight;
2260122614
this.actualDepth = this.actualLayer.actualDepth;
2260222615

22616+
this.depth = this.actualLayer.depth;
22617+
2260322618
this.layerDimension = this.actualLayer.layerDimension;
2260422619

2260522620
this.openFmCenters = this.actualLayer.openFmCenters;
2260622621

22622+
this.lastLayer = this.actualLayer.lastLayer;
22623+
2260722624
},
2260822625

2260922626
/**
@@ -22652,6 +22669,13 @@ Reshape.prototype = {
2265222669

2265322670
setEnvironment: function( context, model ) {
2265422671

22672+
if ( this.actualLayer === undefined ) {
22673+
22674+
this.createActualLayer();
22675+
this.updateLayerMetric();
22676+
22677+
}
22678+
2265522679
this.actualLayer.setEnvironment( context, model );
2265622680

2265722681
},
@@ -22698,6 +22722,20 @@ Reshape.prototype = {
2269822722

2269922723
},
2270022724

22725+
translateLayer: function( targetCenter, translateTime ) {
22726+
22727+
this.actualLayer.translateLayer( targetCenter, translateTime );
22728+
22729+
},
22730+
22731+
apply: function( lastLayer ) {
22732+
22733+
this.actualLayer.apply( lastLayer );
22734+
22735+
this.updateLayerMetric();
22736+
22737+
},
22738+
2270122739
setShape: function( shape ) {
2270222740

2270322741
// Based on shape dimension, update proxy states.
@@ -22732,6 +22770,15 @@ Reshape.prototype = {
2273222770

2273322771
assemble: function() {
2273422772

22773+
this.setReshapeType();
22774+
22775+
this.actualLayer.assemble();
22776+
this.updateLayerMetric();
22777+
22778+
},
22779+
22780+
setReshapeType: function() {
22781+
2273522782
// If "setShape" has been called before, there is no need to check "shape" attribute or "targetShape" attribute in config.
2273622783

2273722784
if ( this.reshapeType === undefined ) {
@@ -22794,9 +22841,6 @@ Reshape.prototype = {
2279422841

2279522842
}
2279622843

22797-
this.actualLayer.assemble();
22798-
this.updateLayerMetric();
22799-
2280022844
}
2280122845

2280222846
};
@@ -31984,6 +32028,8 @@ function MergeProxy( operatorType, layerList, config ) {
3198432028
this.actualHeight = undefined;
3198532029
this.actualDepth = undefined;
3198632030

32031+
this.depth = undefined;
32032+
3198732033
this.layerDimension = undefined;
3198832034

3198932035
this.openFmCenters = undefined;
@@ -32028,6 +32074,8 @@ MergeProxy.prototype = {
3202832074
this.actualHeight = this.actualLayer.actualHeight;
3202932075
this.actualDepth = this.actualLayer.actualDepth;
3203032076

32077+
this.depth = this.actualLayer.depth;
32078+
3203132079
this.layerDimension = this.actualLayer.layerDimension;
3203232080

3203332081
this.openFmCenters = this.actualLayer.openFmCenters;
@@ -32075,6 +32123,14 @@ MergeProxy.prototype = {
3207532123

3207632124
setEnvironment: function( context, model ) {
3207732125

32126+
if ( this.actualLayer === undefined ) {
32127+
32128+
MergeValidator.validateDimension( this.layerList );
32129+
this.createActualLayer();
32130+
this.updateLayerMetric();
32131+
32132+
}
32133+
3207832134
this.actualLayer.setEnvironment( context, model );
3207932135

3208032136
},
@@ -32127,6 +32183,12 @@ MergeProxy.prototype = {
3212732183

3212832184
},
3212932185

32186+
translateLayer: function( targetCenter, translateTime ) {
32187+
32188+
this.actualLayer.translateLayer( targetCenter, translateTime );
32189+
32190+
},
32191+
3213032192
setShape: function( shape ) {
3213132193

3213232194
// make sure the input elements have the same dimension.
@@ -32518,7 +32580,7 @@ function Multiply( layerList, config ) {
3251832580

3251932581
}
3252032582

32521-
let version = "0.6.0";
32583+
let version = "0.6.1";
3252232584

3252332585
/**
3252432586
* @author syt123450 / https://github.com/syt123450

0 commit comments

Comments
 (0)