Created
July 15, 2022 10:55
-
-
Save LiorB-D/4b686b479ec3a5bd578eb307b74572eb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
copyWeights() { | |
// Turn weights from Tensorformat to array format | |
const weights = this.model.getWeights(); // Pull weights | |
const weightCopies = []; | |
weights.forEach((wLayer) => { | |
let values = wLayer.dataSync(); // turn that layer from Tensor into array | |
weightCopies.push(values); | |
}); | |
return weightCopies; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment