def __init__(self, name, input, i, j, k):
"""
:param input: A 4D-tensor of shape [batchSize, 224, 224, 3]
[0:i, :, :, :] holds i style images,
[i:i+j, :, :, :] holds j content images,
[i+j:i+j+k, :, :, :] holds k synthesized images
"""
self.name = name
self.num_style = i
self.num_content = j
self.num_synthesized = k
with open("models/vgg16.tfmodel", mode='rb') as f:
file_content = f.read()
graph_def = tf.GraphDef()
graph_def.ParseFromString(file_content)
tf.import_graph_def(graph_def, input_map={"images": input}, name=self.name)
vgg_network.py 文件源码
python
阅读 26
收藏 0
点赞 0
评论 0
评论列表
文章目录