Commit bf51d434 authored by qingzew's avatar qingzew Committed by drpngx
Browse files

fix module object has no attribute NodeDef for tensorflow 0.11 (#572)

* fix module object has no attribute NodeDef for tensorflow 0.11

* change graph_pb2.NodeDef to tf.NodeDef
parent b4cb2454
...@@ -84,7 +84,6 @@ from __future__ import print_function ...@@ -84,7 +84,6 @@ from __future__ import print_function
import tensorflow as tf import tensorflow as tf
from tensorflow.core.framework import graph_pb2
from inception.slim import scopes from inception.slim import scopes
# Collection containing all the variables created using slim.variables # Collection containing all the variables created using slim.variables
...@@ -211,7 +210,7 @@ def variable_device(device, name): ...@@ -211,7 +210,7 @@ def variable_device(device, name):
"""Fix the variable device to colocate its ops.""" """Fix the variable device to colocate its ops."""
if callable(device): if callable(device):
var_name = tf.get_variable_scope().name + '/' + name var_name = tf.get_variable_scope().name + '/' + name
var_def = graph_pb2.NodeDef(name=var_name, op='Variable') var_def = tf.NodeDef(name=var_name, op='Variable')
device = device(var_def) device = device(var_def)
if device is None: if device is None:
device = '' device = ''
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment