Simon Zhou

Results 17 comments of Simon Zhou

Sry I give up correcting the codes, they are a bit redundant...

> > save_weights保存的模型,load_weights绝对能加载,不存在什么无法读取的问题。 > > 大神您好, > save_weights()cpu下得到了1个文件,['best_model.weights'],load_weights(./best_model.weights)继续用于预测是没问题的。 > 但是save_weights()gpu下得到四个文件['best_model.weights.data-00000-of-00002', 'best_model.weights.data-00001-of-00002', 'best_model.weights.index', 'checkpoint'],load_weights()时候该怎么写里面的内容,直接写load_weights(./best_model.weights),报错:OSError: Unable to open file (unable to open file: name = './best_model.weights', errno = 2, error message =...

> save_weights保存的模型,load_weights绝对能加载,不存在什么无法读取的问题。 目前的问题是,由于预训练使用的是tf,所以save_weights保存的格式是tf格式的weights(checkpoint) 而微调的时候,使用的是keras,所以load_weights理应读取单个h5文件,所以load_weights也就无论如何都用不了了。 (如果传入saved_model目录,则报错"Is a directory",如果传入saved_model/bert_model.ckpt,则报文件不存在,因为bert_model.ckpt存的是checkpoint格式而不是单文件) 而您这边实现的load_weights_from_checkpoint,在读取的时候由于前者预训练过后保存的参数名和模型本身的参数名不一致,所以map失败了

预训练保存的模型keys为: ``` ['_CHECKPOINTABLE_OBJECT_GRAPH (DT_STRING) []', 'layer_with_weights-0/embeddings/.ATTRIBUTES/VARIABLE_VALUE (DT_FLOAT) [21128,768]', 'layer_with_weights-0/embeddings/.OPTIMIZER_SLOT/optimizer/ag/.ATTRIBUTES/VARIABLE_VALUE (DT_FLOAT) [21128,768]', 'layer_with_weights-0/embeddings/.OPTIMIZER_SLOT/optimizer/m/.ATTRIBUTES/VARIABLE_VALUE (DT_FLOAT) [21128,768]', 'layer_with_weights-0/embeddings/.OPTIMIZER_SLOT/optimizer/v/.ATTRIBUTES/VARIABLE_VALUE (DT_FLOAT) [21128,768]', 'layer_with_weights-1/embeddings/.ATTRIBUTES/VARIABLE_VALUE (DT_FLOAT) [2,768]', 'layer_with_weights-1/embeddings/.OPTIMIZER_SLOT/optimizer/ag/.ATTRIBUTES/VARIABLE_VALUE (DT_FLOAT) [2,768]', 'layer_with_weights-1/embeddings/.OPTIMIZER_SLOT/optimizer/m/.ATTRIBUTES/VARIABLE_VALUE (DT_FLOAT) [2,768]', 'layer_with_weights-1/embeddings/.OPTIMIZER_SLOT/optimizer/v/.ATTRIBUTES/VARIABLE_VALUE (DT_FLOAT) [2,768]', 'layer_with_weights-10/i0_dense/bias/.ATTRIBUTES/VARIABLE_VALUE...

或者使用这个方案?https://askubuntu.com/a/816/1410764 One approach is to add an @reboot [cron](http://en.wikipedia.org/wiki/Cron) task: Running crontab -e will allow you to edit your cron. Adding a line like this to it: @reboot /path/to/script will...

或者.bash_login?

> @jbkyang-nvi thank you! I've managed to build the CPU-only image with `onnxruntimebackend` entirely in Docker (without relying on other Dockerfiles to copy data), so if there's any way I...

btw, I am transfering tf-serving to triton and the model works fine on Tensorflow Serving 2.7.0

duplicate of https://github.com/triton-inference-server/server/issues/2443

Tried triton version 22.02-py3: issue remains. Tried triton version 21.08 (which the version of tensorflow is the same as where I trained my model, 2.5.0, indicated by https://github.com/triton-inference-server/server/issues/3604#issuecomment-982125998, [support matrix](https://docs.nvidia.com/deeplearning/frameworks/support-matrix/index.html)):...