提交 ed5be536 编写于 作者: J jiangjiajun

modify dependency

上级 0c13354d
......@@ -14,10 +14,7 @@ setup(
license='Apache 2',
packages=find_packages(),
install_requires=[
'paddlepaddle >= 1.2.1',
'tensorflow >= 1.12.0',
],
install_requires=[],
entry_points={
'console_scripts': [
......
......@@ -99,9 +99,10 @@ class PaddleEmitter(object):
filew.write(tensor_desc.SerializeToString())
tensor_size = reduce(lambda x, y: x * y, shape)
weight = weight.flatten()
tensor_stream = ""
for i in range(0, tensor_size):
filew.write(
struct.pack(struct_write_format[str(weight.dtype)], weight[i]))
tensor_stream += struct.pack(struct_write_format[str(weight.dtype)], weight[i])
filew.write(tensor_stream)
filew.close()
@property
......@@ -120,7 +121,6 @@ class PaddleEmitter(object):
self.body_code += (self.tab * indent) + code + "\n"
def run(self):
print("new version")
node = self.graph.tf_graph.node[0]
self.add_codes(0, self.header_code)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册