Created
August 23, 2018 21:04
-
-
Save AurelianTactics/2aef4ba15117f2a4438aa765c62648c2 to your computer and use it in GitHub Desktop.
modified visionnet code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ray.rllib.models.misc import get_activation_fn, flatten, AddCoords | |
... | |
def _build_layers(self, inputs, num_outputs, options): | |
if options.get('custom_options', {}).get('add_coordinates'): | |
with_r = False | |
if options.get('custom_options', {}).get('add_coords_with_r'): | |
with_r = True | |
addcoords = AddCoords(x_dim=int(np.shape(inputs)[1]), y_dim=int(np.shape(inputs)[1]),with_r=with_r) | |
inputs = addcoords(inputs) | |
print("visionnet: Added coordinate filters tensor size is now {}".format(np.shape(inputs))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment