Skip to content

Commit e96e263

Browse files
authored
Merge pull request #489 from byronbest/patch-3
change set_field to setproperty
2 parents a27d621 + c5bf05c commit e96e263

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/ops/control_flow.jl

+8-8
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,11 @@ function with_frame(f, parallel_iterations, back_prop, swap_memory)
126126
frame_name = string(op_context.while_context[end].context_name, "/", "while")
127127
end
128128
while_context = tensorflow.WhileContextDef(parallel_iterations=parallel_iterations, back_prop=back_prop, swap_memory=swap_memory)
129-
set_field!(while_context, :context_name, frame_name)
129+
setproperty!(while_context, :context_name, frame_name)
130130
add_to_collection(get_def_graph(), :while_context, while_context)
131-
set_field!(while_context, :loop_exit_names, AbstractString[])
132-
set_field!(while_context, :values_def, tensorflow.ValuesDef())
133-
set_field!(while_context.values_def, :values, AbstractString[])
131+
setproperty!(while_context, :loop_exit_names, AbstractString[])
132+
setproperty!(while_context, :values_def, tensorflow.ValuesDef())
133+
setproperty!(while_context.values_def, :values, AbstractString[])
134134
push!(op_context.while_context, while_context)
135135
f()
136136
pop!(op_context.while_context)
@@ -284,7 +284,7 @@ Example using shape_invariants:
284284
push!(merge_nodes, merge_op)
285285
fillin(merge_op.op)
286286
end
287-
set_field!(context, :pivot_for_pred_name, get_name(merge_nodes[1]))
287+
setproperty!(context, :pivot_for_pred_name, get_name(merge_nodes[1]))
288288
289289
# (Define the graph to)
290290
# evaluate the condition at each loop
@@ -293,7 +293,7 @@ Example using shape_invariants:
293293
condition(merge_node_structs...)
294294
end
295295
pred = Ops.loop_cond(condition_out)
296-
set_field!(context, :pivot_name, get_name(pred))
296+
setproperty!(context, :pivot_name, get_name(pred))
297297
298298
# Body stuff
299299
# Define the output structure for the result of the body
@@ -310,7 +310,7 @@ Example using shape_invariants:
310310
body_pivot = identity(switch_true)
311311
push!(body_input, body_pivot)
312312
end
313-
set_field!(context, :pivot_for_body_name, get_name(body_input[1]))
313+
setproperty!(context, :pivot_for_body_name, get_name(body_input[1]))
314314
315315
# (define the graph to)
316316
# actually execute the body
@@ -372,7 +372,7 @@ Example using shape_invariants:
372372
push!(context.values_def.values, get_name(Tensor(op, output_idx)))
373373
end
374374
end
375-
set_field!(context.values_def, :external_values, Dict{AbstractString, AbstractString}())
375+
setproperty!(context.values_def, :external_values, Dict{AbstractString, AbstractString}())
376376
for node in g_def.node
377377
for (input_idx, input) in enumerate(node.input)
378378
name, port = parse_port_name(input)

0 commit comments

Comments
 (0)