Skip to content

Commit

Permalink
[BugFix] Fix error attributes setting in FusedLinear unitest (#50359)
Browse files Browse the repository at this point in the history
* first commit.

* change host logic

* fix code bugs

* fix code error

---------

Co-authored-by: zhangbopd <1299246947@qq.com>
  • Loading branch information
JamesLim-sy and zhangbopd authored Mar 6, 2023
1 parent 12eff93 commit 11a6149
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def setUp(self):
'Y': np.random.random((4, 128)).astype(self.dtype) - 0.5,
}

self.attrs = {"activation": 'none'}
self.attrs = {"activation_grad": 'none'}

DX, DY, DBias = get_outputs(
self.inputs['DOut'], self.inputs['X'], self.inputs['Y']
Expand Down Expand Up @@ -105,7 +105,7 @@ def setUp(self):
'Y': np.random.random((4, 128)).astype(self.dtype) - 0.5,
}

self.attrs = {"activation": 'none'}
self.attrs = {"activation_grad": 'none'}

_, DY, DBias = get_outputs(
self.inputs['DOut'], self.inputs['X'], self.inputs['Y']
Expand Down Expand Up @@ -164,7 +164,7 @@ def setUp(self):
'Y': np.random.random((4, 128)).astype(self.dtype) - 0.5,
}

self.attrs = {"activation": 'none'}
self.attrs = {"activation_grad": 'none'}

_, DY, _ = get_outputs(
self.inputs['DOut'], self.inputs['X'], self.inputs['Y']
Expand Down Expand Up @@ -219,7 +219,7 @@ def setUp(self):
'Y': np.random.random((4, 128)).astype(self.dtype) - 0.5,
}

self.attrs = {"activation": 'none'}
self.attrs = {"activation_grad": 'none'}

DX, DY, _ = get_outputs(
self.inputs['DOut'], self.inputs['X'], self.inputs['Y']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def init_data(self):
'Y': np.random.random((4, 128)).astype(self.dtype) - 0.5,
}

self.attrs = {"activation": 'none'}
self.attrs = {"activation_grad": 'none'}

DX, DY, DBias = get_outputs(
self.inputs['DOut'], self.inputs['X'], self.inputs['Y']
Expand All @@ -81,7 +81,7 @@ def init_data(self):
'Y': np.random.random((4, 128)).astype(self.dtype) - 0.5,
}

self.attrs = {"activation": 'none'}
self.attrs = {"activation_grad": 'none'}

_, DY, DBias = get_outputs(
self.inputs['DOut'], self.inputs['X'], self.inputs['Y']
Expand All @@ -96,7 +96,7 @@ def init_data(self):
'Y': np.random.random((4, 128)).astype(self.dtype) - 0.5,
}

self.attrs = {"activation": 'none'}
self.attrs = {"activation_grad": 'none'}

_, DY, _ = get_outputs(
self.inputs['DOut'], self.inputs['X'], self.inputs['Y']
Expand All @@ -111,7 +111,7 @@ def init_data(self):
'Y': np.random.random((4, 128)).astype(self.dtype) - 0.5,
}

self.attrs = {"activation": 'none'}
self.attrs = {"activation_grad": 'none'}

DX, DY, _ = get_outputs(
self.inputs['DOut'], self.inputs['X'], self.inputs['Y']
Expand Down

0 comments on commit 11a6149

Please sign in to comment.