如何解决为什么不允许使用输入类型:REFvariant作为REGISTER_OP中的输入?
以下是REGISTER_OP。
File "vast.py",line 17,in def_graph
vast_request = vast_kernel.user_vec_generate(vast_request,exp_params,config_file = op_config_path)
File "<string>",line 45,in user_vec_generate
File "/usr/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py",line 641,in _apply_op_helper
"(e.g.: a tf.Variable)") % (op_type_name,input_name))
TypeError: 'UserVecGenerate' Op requires that input 'vast_request_in' be a mutable tensor (e.g.: a tf.Variable)
但是当我得到pbtxt时,会出现以下错误:
$ cat tst.awk
BEGIN { OFS="\t" }
NR == 1 {
for (i=3; i<=NF; i++) {
h[i] = $i
sub(/[^_]+_/,"",h[i])
}
rest = $3
sub(/_.*/,rest)
}
NR > 1 {
rest = sep = ""
for (i=3; i<=NF; i++) {
if ($i != 0) {
rest = rest sep h[i]
sep = ","
}
}
}
{ print $1,$2,rest }
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。