MCPcopy Create free account
hub / github.com/tensorflow/tfjs-examples / convOutput2ClassOutput

Function convOutput2ClassOutput

visualize-convnet/cam.js:86–87  ·  view source on GitHub ↗
(input)

Source from the content-addressed store, hash-verified

84 // This function runs sub-model 2 and extracts the slice of the probability
85 // output that corresponds to the desired class.
86 const convOutput2ClassOutput = (input) =>
87 subModel2.apply(input, {training: true}).gather([classIndex], 1);
88 // This is the gradient function of the output corresponding to the desired
89 // class with respect to its input (i.e., the output of the last
90 // convolutional layer of the original model).

Callers

nothing calls this directly

Calls 1

applyMethod · 0.45

Tested by

no test coverage detected