Skip to content

Commit dbb5a31

Browse files
dbishfacebook-github-bot
authored andcommitted
Fixed bug in House_Prices_Regression_Interpret tutorial (#1014)
Summary: Described in issue: [1012](#1012) **Background** There's a line that must have been edited/added at some point that assumes more then one tensor is being returned from lc.attribute, but there's only one (since only one tensor is passed in): lc_attr_test = lc.attribute(X_test, n_steps=100, attribute_to_layer_input=True) # shape: test_examples x size_hidden lc_attr_test = lc_attr_test[0] The second line here of setting lc_attr_test to the 0th index, then sets it to the tensor index instead of the first tensor, which in turn in the next cell means that "lc_attr_test.shape[1]" throws an exception. **Changes** Fix is to just take out the reassigning of "lc_attr_test = lc_attr_test[0]". **Testing** Tested running the notebook before the change (which showed the error described) and after, which produced the plot which was originally shown in the static tutorial page and matches expectations now (see attachment) <img width="1257" alt="Screen Shot 2022-08-18 at 9 59 25 PM" src="https://user-images.githubusercontent.com/1166295/185547685-8ca05307-19cd-4496-9f9a-7b0cf92f96c2.png"> . Pull Request resolved: #1014 Reviewed By: vivekmig Differential Revision: D38927725 Pulled By: dbish fbshipit-source-id: bda2c0a98638ea1b0f5dc15f8c249985fc890cf7
1 parent 312acd8 commit dbb5a31

File tree

1 file changed

+20
-22
lines changed

1 file changed

+20
-22
lines changed

tutorials/House_Prices_Regression_Interpret.ipynb

+20-22
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)