Skip to content

Added functionality for retrieving variables from control dependencies #220

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jan 31, 2017

Conversation

Wapaul1
Copy link
Contributor

@Wapaul1 Wapaul1 commented Jan 19, 2017

This functionality is primarily for passing in opt.minimize as the loss function to TensorFlowVariables, and now no longer has the prefixing.

# Tests if all variables are properly retrieved, 2 variables and 2 momentum
# variables.
self.assertEqual(len(net_vars.variables.items()), 4)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also call get_weights and set_weights and make sure those methods work in this case? (you'll probably need to call init as well).

if op.node_def.op == "Variable":
variable_names.append(op.node_def.name)
tf_obj = queue.popleft()
if hasattr(tf_obj, "op"):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This if statement is a bit confusing to me, why are we doing this?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's the right thing to do, could you document why?

@robertnishihara
Copy link
Collaborator

We also need to change examples/lbfgs/driver.py to use a separate graph for the network created there, right?

prefix = str(uuid.uuid1().hex)
# Use the tensorflow variable_scope to prefix all of the variables
with tf.variable_scope(prefix):
# Use a seperate graph for each network.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seperate -> separate

@pcmoritz pcmoritz merged commit db72978 into ray-project:master Jan 31, 2017
@pcmoritz pcmoritz deleted the fixmin branch January 31, 2017 03:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants