Skip to content

Commit

Permalink
Update inspect_gen.py
Browse files Browse the repository at this point in the history
  • Loading branch information
OverLordGoldDragon committed May 30, 2020
1 parent 2f699e7 commit ce34d0e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion see_rnn/inspect_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,12 @@ def _get_info(model, _id, layer, mode):
else:
grads_fn = _make_grads_fn(model, params=params)
if sample_weight is None:
sw = None if TF_KERAS else np.ones(len(input_data))
if TF_KERAS:
sw = None
elif isinstance(input_data, list):
sw = np.ones(len(input_data[0]))
else:
sw = np.ones(len(input_data))
if isinstance(input_data, list):
sample_weight = []
for x in input_data:
Expand Down

0 comments on commit ce34d0e

Please sign in to comment.