justadudewhohacks / tfjs-tiny-yolov2

Tiny YOLO v2 object detection with tensorflow.js.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Help with extracting weights

dimitrius-ion opened this issue · comments

hello @justadudewhohacks ,

First of all thank you for this awesome project. i love your object oriented style of coding.

I have a small question: Is there a way to extract weights from trained model aka net?
Is there a way to save it as tf.Model(). Probably not but does not hurt to ask :)

Thank you again.

I figured it out: its under params and paramMappings

If anyone else is looking for it, its in train/voc/trainVoc.html

function saveWeights(net, filename = 'train_tmp') {
saveAs(new Blob([net.serializeParams()]), filename)
}