94d20f71a3b9be4ce6764240fa34767114ad616b,examples/pretrained_cnn/tutorial_vgg16.py,,,#,108

Before Change


// correct_prediction = tf.equal(tf.cast(tf.argmax(y, 1), tf.float32), tf.cast(y_, tf.float32))
// acc = tf.reduce_mean(tf.cast(correct_prediction, tf.float32))

tl.layers.initialize_global_variables(sess)
net.print_params()
net.print_layers()

tl.files.maybe_download_and_extract(

After Change


    return net


sess = tf.InteractiveSession()

x = tf.placeholder(tf.float32, [None, 224, 224, 3])
// y_ = tf.placeholder(tf.int32, shape=[None, ], name="y_")

net_in = InputLayer(x, name="input")
// net_cnn = conv_layers(net_in)               // professional CNN APIs
net_cnn = conv_layers_simple_api(net_in)  // simplified CNN APIs
net = fc_layers(net_cnn)

y = net.outputs
probs = tf.nn.softmax(y)
// y_op = tf.argmax(tf.nn.softmax(y), 1)
// cost = tl.cost.cross_entropy(y, y_, name="cost")
// correct_prediction = tf.equal(tf.cast(tf.argmax(y, 1), tf.float32), tf.cast(y_, tf.float32))
// acc = tf.reduce_mean(tf.cast(correct_prediction, tf.float32))

sess.run(tf.global_variables_initializer())
net.print_params()
net.print_layers()

tl.files.maybe_download_and_extract(
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 9

Instances


Project Name: tensorlayer/tensorlayer
Commit Name: 94d20f71a3b9be4ce6764240fa34767114ad616b
Time: 2019-01-16
Author: dhsig552@163.com
File Name: examples/pretrained_cnn/tutorial_vgg16.py
Class Name:
Method Name:


Project Name: tensorlayer/tensorlayer
Commit Name: 94d20f71a3b9be4ce6764240fa34767114ad616b
Time: 2019-01-16
Author: dhsig552@163.com
File Name: examples/reinforcement_learning/tutorial_cartpole_ac.py
Class Name:
Method Name:


Project Name: tensorlayer/tensorlayer
Commit Name: 94d20f71a3b9be4ce6764240fa34767114ad616b
Time: 2019-01-16
Author: dhsig552@163.com
File Name: examples/pretrained_cnn/tutorial_vgg19.py
Class Name:
Method Name:


Project Name: tensorlayer/tensorlayer
Commit Name: 94d20f71a3b9be4ce6764240fa34767114ad616b
Time: 2019-01-16
Author: dhsig552@163.com
File Name: examples/reinforcement_learning/tutorial_bipedalwalker_a3c_continuous_action.py
Class Name:
Method Name: