Skip to content
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

contrib: autograph/constrained_optimization: minor spelling tweaks #20044

Merged
merged 1 commit into from
Jun 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion tensorflow/contrib/autograph/converters/control_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def new_symbol(self, name_root, reserved_locals):


class ControlFlowTransformer(transformer.Base):
"""Transforms control flow structures like loops an conditionals."""
"""Transforms control flow structures like loops and conditionals."""

def _create_cond_branch(self, body_name, aliased_orig_names,
aliased_new_names, body, returns):
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/contrib/autograph/operators/control_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def for_stmt(iter_, extra_test, body, init_state):
Args:
iter_: The entity being iterated over.
extra_test: Callable with the state as arguments, and boolean return type.
An additionnal loop condition.
An additional loop condition.
body: Callable with the iterate and the state as arguments, and
state as return type. The actual loop body.
init_state: Tuple containing the initial state.
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/contrib/autograph/pyct/static_analysis/cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def __init__(self, label, context, transfer_fn=operator.or_):

# TODO(alexbw): see if we can simplify by visiting breadth-first
def visit(self, node):
"""Depth-first walking the CFG, applying dataflow information propagtion."""
"""Depth-first walking the CFG, applying dataflow information propagation."""
# node.value is None only for the exit CfgNode.
if not node.value:
return
Expand Down
4 changes: 2 additions & 2 deletions tensorflow/contrib/autograph/pyct/transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def after_visit(node):

# TODO(mdan): Once we have error tracing, we may be able to just go to SSA.
def apply_to_single_assignments(self, targets, values, apply_fn):
"""Applies a fuction to each individual assignment.
"""Applies a function to each individual assignment.

This function can process a possibly-unpacked (e.g. a, b = c, d) assignment.
It tries to break down the unpacking if possible. In effect, it has the same
Expand Down Expand Up @@ -219,7 +219,7 @@ def apply_to_single_assignments(self, targets, values, apply_fn):
targets field of an ast.Assign node.
values: an AST node.
apply_fn: a function of a single argument, which will be called with the
respective nodes of each single assignment. The signaure is
respective nodes of each single assignment. The signature is
apply_fn(target, value), no return value.
"""
if not isinstance(targets, (list, tuple)):
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/contrib/constrained_optimization/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ document.
Imagine that we want to constrain the recall of a binary classifier to be at
least 90%. Since the recall is proportional to the number of true positive
classifications, which itself is a sum of indicator functions, this constraint
is non-differentible, and therefore cannot be used in a problem that will be
is non-differentiable, and therefore cannot be used in a problem that will be
optimized using a (stochastic) gradient-based algorithm.

For this and similar problems, TFCO supports so-called *proxy constraints*,
Expand Down