Skip to content

Some specifical kind of models will clear their input when calling clearState() #1677

Open
@qiuxin2012

Description

@qiuxin2012

Model like

val model = ParallelTable()
model.add(Identity()) // or other model with inplace.
model.add(Linear(5, 10))

val input = T(Tensor(2, 3), Tensor(2, 5))

model.forward(input)
model.clearState()
println(input)

It's output is

 {
	2: 0.0 0.0	0.0	0.0	0.0	
	   0.0	 0.0	0.0	0.0	0.0	
	   [com.intel.analytics.bigdl.tensor.DenseTensor$mcF$sp of size 2x5]
	1: [com.intel.analytics.bigdl.tensor.DenseTensor$mcF$sp with no dimension]
 }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions