wenxinxu/resnet-in-tensorflow

the error in file 'resnet.py' (how to run with tensorflow 1.0.0)

qingchengboy opened this issue · 2 comments

hi, thanks for u code :)
when i run 'cifar10_train.py' found a error:
line 40,"new_variables = tf.get_variable(name, shape=shape, initializer=initializer,
regularizer=regularizer)"

TypeError: init() got multiple values for keyword argument 'dtype'

Hi,
This code was written with tensorflow 0.9.0. If you are using newer version, please change line 53 into fc_b = create_variables(name='fc_bias', shape=[num_labels], initializer=tf.zeros_initializer()). No big change. Just to add an bracket after the zeros_initializer() . Let me know if this solves your problem

@wenxinxu thanks, i used tensorflow 1.0, according to your method and change line 276 into "cross_entropy=tf.nn.sparse_softmax_cross_entropy_with_logits(None,labels,logits,name='cross_entropy_per_example')". Then the code run ok.