Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/singa/autograd.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def backward(y, dy=None):
if y_stores_grad and tensor_dep[x_id] == 0:
# store the gradient for final return, e.g. for parameters.
# it may cause a delay to yield. Only after src_op's all
# output tensors have recieved the gradients, then output
# output tensors have received the gradients, then output
g = not_ready[src_op][y_idx]
tg = Tensor(device=g.device(),
data=g,
Expand Down
4 changes: 2 additions & 2 deletions python/singa/opt.py
Original file line number Diff line number Diff line change
Expand Up @@ -920,12 +920,12 @@ def backward_and_update_half(self,
self.opt.step()

def backward_and_partial_update(self, loss, threshold=2097152):
"""Performs backward propagation from the loss and parameter update using asychronous training.
"""Performs backward propagation from the loss and parameter update using asynchronous training.

THIS IS A EXPERIMENTAL FUNCTION FOR RESEARCH PURPOSE:
From the loss, it performs backward propagation to get the gradients and do the parameter
update. It fuses the tensors smaller than the threshold value to reduce network latency,
as well as performing asychronous training where one parameter partition is all-reduced
as well as performing asynchronous training where one parameter partition is all-reduced
per iteration. The size of the parameter partition depends on the threshold value.

Args:
Expand Down
2 changes: 1 addition & 1 deletion python/singa/sonnx.py
Original file line number Diff line number Diff line change
Expand Up @@ -1787,7 +1787,7 @@ def run_node(cls, node, inputs, device='CPU', opset_version=_opset_version):
node.op_type, len(valid_inputs), len(inputs))

operator = cls._onnx_node_to_singa_op(node, opset_version)
# seperate weights with inputs, and init inputs as Tensor
# separate weights with inputs, and init inputs as Tensor
weights = {}
_inputs = []
for (key, val) in zip(valid_inputs, inputs):
Expand Down