@@ -126,11 +126,11 @@ function with_frame(f, parallel_iterations, back_prop, swap_memory)
126
126
frame_name = string (op_context. while_context[end ]. context_name, " /" , " while" )
127
127
end
128
128
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)
130
130
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[])
134
134
push! (op_context. while_context, while_context)
135
135
f ()
136
136
pop! (op_context. while_context)
@@ -284,7 +284,7 @@ Example using shape_invariants:
284
284
push!(merge_nodes, merge_op)
285
285
fillin(merge_op.op)
286
286
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]))
288
288
289
289
# (Define the graph to)
290
290
# evaluate the condition at each loop
@@ -293,7 +293,7 @@ Example using shape_invariants:
293
293
condition(merge_node_structs...)
294
294
end
295
295
pred = Ops.loop_cond(condition_out)
296
- set_field !(context, :pivot_name, get_name(pred))
296
+ setproperty !(context, :pivot_name, get_name(pred))
297
297
298
298
# Body stuff
299
299
# Define the output structure for the result of the body
@@ -310,7 +310,7 @@ Example using shape_invariants:
310
310
body_pivot = identity(switch_true)
311
311
push!(body_input, body_pivot)
312
312
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]))
314
314
315
315
# (define the graph to)
316
316
# actually execute the body
@@ -372,7 +372,7 @@ Example using shape_invariants:
372
372
push!(context.values_def.values, get_name(Tensor(op, output_idx)))
373
373
end
374
374
end
375
- set_field !(context.values_def, :external_values, Dict{AbstractString, AbstractString}())
375
+ setproperty !(context.values_def, :external_values, Dict{AbstractString, AbstractString}())
376
376
for node in g_def.node
377
377
for (input_idx, input) in enumerate(node.input)
378
378
name, port = parse_port_name(input)
0 commit comments