mirror of
https://github.com/wassname/ray.git
synced 2026-07-18 12:40:56 +08:00
[rllib] Add downscale and frameskip options for Montezumas (#908)
* up * update * fix * update * update * update * api break * Update run_multi_node_tests.sh * fix
This commit is contained in:
committed by
Philipp Moritz
parent
7a36430399
commit
1ebfe9608f
@@ -12,11 +12,19 @@ class VisionNetwork(Model):
|
||||
"""Generic vision network."""
|
||||
|
||||
def _init(self, inputs, num_outputs, options):
|
||||
filters = options.get("conv_filters", [
|
||||
[16, [8, 8], 4],
|
||||
[32, [4, 4], 2],
|
||||
[512, [10, 10], 1],
|
||||
])
|
||||
with tf.name_scope("vision_net"):
|
||||
conv1 = slim.conv2d(inputs, 16, [8, 8], 4, scope="conv1")
|
||||
conv2 = slim.conv2d(conv1, 32, [4, 4], 2, scope="conv2")
|
||||
for i, (out_size, kernel, stride) in enumerate(filters[:-1], 1):
|
||||
inputs = slim.conv2d(
|
||||
inputs, out_size, kernel, stride,
|
||||
scope="conv{}".format(i))
|
||||
out_size, kernel, stride = filters[-1]
|
||||
fc1 = slim.conv2d(
|
||||
conv2, 512, [10, 10], padding="VALID", scope="fc1")
|
||||
inputs, out_size, kernel, stride, padding="VALID", scope="fc1")
|
||||
fc2 = slim.conv2d(fc1, num_outputs, [1, 1], activation_fn=None,
|
||||
normalizer_fn=None, scope="fc2")
|
||||
return tf.squeeze(fc2, [1, 2]), tf.squeeze(fc1, [1, 2])
|
||||
|
||||
Reference in New Issue
Block a user