Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
TransferLearning.GraphBuilder#nOutReplace does not work on layer before SubsamplingLayer #6389
SubsamplingLayer escapes the !vertex.hasLayer exception in transferlearning as it is a layer (but apparently not a Feedforward layer).
Trying to do something in line with what the recommendation of that assert says (use removeVertex followed by addVertex but do addLayer instead) does not seem to work either as the expected number of inputs of the next layer is not updated. Haven't verified if this is the case for non-layer vertexes though...
I also could not find a way to deliver the the expectation from removeVertexKeepConnections: "Note the expectation here is to then add back another vertex with the same name or else the graph will be left in an invalid state": There is no method to just add back a vertex/layer without any inputs and at least addLayer throws an exception if inputs is not set.
Testcase which reproduces the issue: