Skip to content

Two SimpleChains overwrite each other's predictions? #138

@jmsull

Description

@jmsull

The predictions of two SCs which should have nothing to do with each other seem to be overwriting each other? This seems like a bug, but let me know if I am doing something obviously wrong?

Here is a ~MWE of some code I have been running:

using SimpleChains
sc1 = SimpleChain(
    static(1),
    TurboDense{true}(tanh, 128), 
    TurboDense{true}(tanh, 128), 
    TurboDense{false}(identity, 1), 
    )
p1 = SimpleChains.init_params(sc1);

sc2 = SimpleChain(
    static(1),
    TurboDense{true}(tanh, 128),  
    TurboDense{true}(tanh, 128), 
    TurboDense{false}(identity, 1), 
    )
p2 = SimpleChains.init_params(sc2); 

@assert p1 != p2

X = randn(Float32,1,10); #some inputs
sc1(X, p1)[1,1]  sc2(X, p2)[1,1] #false, not the same

y1 = sc1(X, p1) 
y2 = sc2(X, p2)
y1[1,1] == y2[1,1] #true, the same

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions