Skip to content

Commit

Permalink
fix issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ohad123 committed Aug 16, 2024
1 parent d93b548 commit 4f00862
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src_erl/NerlnetApp/src/Bridge/onnWorkers/nerlNIF.erl
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,11 @@ get_weights_sync(WeightsEts) ->
recv_call_loop(WeightsEts) ->
receive
{get_weights, NerlTensorWeights, NerlTensorType} ->
io:format("Received weights~n"),
ets:insert(WeightsEts, {weights, {NerlTensorWeights, NerlTensorType}}),
ets:update_element(WeightsEts, weights_status, {?ETS_KEYVAL_VAL_IDX, updated}); % save weights to temporary ets - TODO try to optimize
io:format("ets insert weights: ~n",[]),
ets:update_element(WeightsEts, weights_status, {?ETS_KEYVAL_VAL_IDX, updated}), % save weights to temporary ets - TODO try to optimize
io:format("ets update weights_status: ~n",[]);
_Else -> ?LOG_ERROR("Received wrong message in get_weights_nif~n"),
recv_call_loop(WeightsEts)
end.
Expand Down

0 comments on commit 4f00862

Please sign in to comment.