- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [X] regression (a behavior that used to work and stopped in a new release)
Minimal steps to reproduce
Train and export a new model in Custom Vision
Try to run this model using the ImageClassifer module
Any log messages given by the failure
Expected/desired behavior
Works as before
Versions
Mention any other details that might be useful
New models exported as Tensorflow .pb files appear to know have an input layer size of 224 whereas previously this was 227. In this code the 227 is hardcoded in so newly exported models have stopped working.
Have this issue fixed in my code and will create a pull request. Fix is to extend initialize() to use the shape of the input layer:
def initialize():
print('Loading model...',end=''),
with tf.gfile.GFile(filename, 'rb') as f:
graph_def.ParseFromString(f.read())
tf.import_graph_def(graph_def, name='')
input_tensor = tf.get_default_graph().get_tensor_by_name("Placeholder:0")
network_input_size = int(input_tensor.get_shape()[1])
print("Adjusted network input size to " + str(network_input_size))
print('Success!')
print('Loading labels...', end='')
with open(labels_filename, 'rt') as lf:
for l in lf:
l = l[:-1]
labels.append(l)
print(len(labels), 'found. Success!')
This issue is for a: (mark with an
x
)Minimal steps to reproduce
Any log messages given by the failure
Expected/desired behavior
Versions
Mention any other details that might be useful
New models exported as Tensorflow .pb files appear to know have an input layer size of 224 whereas previously this was 227. In this code the 227 is hardcoded in so newly exported models have stopped working.
Have this issue fixed in my code and will create a pull request. Fix is to extend
initialize()
to use the shape of the input layer: