-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Description
when converting models downloaded from https://github.com/KaimingHe/deep-residual-networks#models,
ended up with error:
Traceback (most recent call last):
File "./convert.py", line 60, in <module>
main()
File "./convert.py", line 56, in main
args.phase)
File "./convert.py", line 27, in convert
transformer = TensorFlowTransformer(def_path, caffemodel_path, phase=phase)
File "/Users/shuang/github/caffe-tensorflow/kaffe/tensorflow/transformer.py", line 227, in __init__
self.load(def_path, data_path, phase)
File "/Users/shuang/github/caffe-tensorflow/kaffe/tensorflow/transformer.py", line 237, in load
graph = DataInjector(def_path, data_path)(graph)
File "/Users/shuang/github/caffe-tensorflow/kaffe/transformers.py", line 86, in __call__
node.data = self.adjust_parameters(node, data)
File "/Users/shuang/github/caffe-tensorflow/kaffe/transformers.py", line 79, in adjust_parameters
data[idx] = np.squeeze(data[idx])
IndexError: list index out of range
If saving only source code, ended up with error:
Traceback (most recent call last):
File "./convert.py", line 60, in <module>
main()
File "./convert.py", line 56, in main
args.phase)
File "./convert.py", line 37, in convert
src_out.write(transformer.transform_source())
File "/Users/shuang/github/caffe-tensorflow/kaffe/tensorflow/transformer.py", line 288, in transform_source
chains = mapper.map()
File "/Users/shuang/github/caffe-tensorflow/kaffe/graph.py", line 288, in map
mapped_chains.append(self.map_chain(chain))
File "/Users/shuang/github/caffe-tensorflow/kaffe/graph.py", line 292, in map_chain
return [self.map_node(node) for node in chain]
File "/Users/shuang/github/caffe-tensorflow/kaffe/graph.py", line 296, in map_node
mapped_node = map_func(node)
File "/Users/shuang/github/caffe-tensorflow/kaffe/tensorflow/transformer.py", line 155, in map_batch_norm
scale_offset = len(node.data) == 4
TypeError: object of type 'NoneType' has no len()
My fix is around line 155 of transformer.py:
if node.data:
scale_offset = len(node.data) == 4
else:
scale_offset = False
but the first error remains.
Metadata
Metadata
Assignees
Labels
No labels