mirror of
https://github.com/wassname/ray.git
synced 2026-07-13 17:45:08 +08:00
@@ -22,14 +22,27 @@ class VisionNetwork(Model):
|
||||
with tf.name_scope("vision_net"):
|
||||
for i, (out_size, kernel, stride) in enumerate(filters[:-1], 1):
|
||||
inputs = slim.conv2d(
|
||||
inputs, out_size, kernel, stride,
|
||||
activation_fn=activation, scope="conv{}".format(i))
|
||||
inputs,
|
||||
out_size,
|
||||
kernel,
|
||||
stride,
|
||||
activation_fn=activation,
|
||||
scope="conv{}".format(i))
|
||||
out_size, kernel, stride = filters[-1]
|
||||
fc1 = slim.conv2d(
|
||||
inputs, out_size, kernel, stride,
|
||||
activation_fn=activation, padding="VALID", scope="fc1")
|
||||
fc2 = slim.conv2d(fc1, num_outputs, [1, 1], activation_fn=None,
|
||||
normalizer_fn=None, scope="fc2")
|
||||
inputs,
|
||||
out_size,
|
||||
kernel,
|
||||
stride,
|
||||
activation_fn=activation,
|
||||
padding="VALID",
|
||||
scope="fc1")
|
||||
fc2 = slim.conv2d(
|
||||
fc1,
|
||||
num_outputs, [1, 1],
|
||||
activation_fn=None,
|
||||
normalizer_fn=None,
|
||||
scope="fc2")
|
||||
return flatten(fc2), flatten(fc1)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user