2
Ich möchte das eingebaute resnet
in tf-slim
für ein schnelles Experiment verwenden. Ich habe nach dem README
in github:AttributeError: Modul 'tensorflow.contrib.slim' hat kein Attribut 'Netze'
import tensorflow as tf
import tensorflow.contrib.slim as slim
resnet = tf.contrib.slim.nets.resnet_v1
mnist = input_data.read_data_sets('MNIST_data', one_hot=True)
x = tf.placeholder("float", shape=[None, 784])
y_ = tf.placeholder("float", shape=[None, 10])
pred = resnet.resnet_v1_50(x)
cross_entropy = -tf.reduce_sum(y_ * tf.log(pred))
bekam aber einen solchen Fehler: AttributeError: module 'tensorflow.contrib.slim' has no attribute 'nets'
. Ich habe bereits die neueste Version von tensorflow-0.12.0
installiert.
Wie kann ich dieses Problem beheben?