Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions files_to_sync.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ minitorch/operators.py
minitorch/module.py
minitorch/autodiff.py
minitorch/scalar.py
minitorch/scalar_functions.py
minitorch/module.py
project/run_manual.py
project/run_scalar.py
4 changes: 2 additions & 2 deletions project/graph_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def __init__(self):
self.intermediates = {}

def get_name(self, x):
if not isinstance(x, minitorch.Scalar) and not isinstance(x, minitorch.Tensor):
if not isinstance(x, minitorch.Tensor):
return "constant %s" % (x,)
elif len(x.name) > 15:
if x.name in self.intermediates:
Expand Down Expand Up @@ -72,7 +72,7 @@ def run(self, final):
G.add_edge(self.get_name(input), op, f"{i}")

for input in cur.history.inputs:
if not isinstance(input, minitorch.Scalar) and not isinstance(
if not isinstance(
input, minitorch.Tensor
):
continue
Expand Down