Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit da79802

Browse files
authored
Remove wrong reference to Scalar
1 parent 034ce65 commit da79802

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

project/graph_builder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def __init__(self):
3939
self.intermediates = {}
4040

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

7474
for input in cur.history.inputs:
75-
if not isinstance(input, minitorch.Scalar) and not isinstance(
75+
if not isinstance(
7676
input, minitorch.Tensor
7777
):
7878
continue

0 commit comments

Comments
 (0)