text: Title: Error reported when NNI was used to prune Albert-tiny
  Body: **Describe the issue**:  
  I'm just pruning the linear layer. Everything seemed fine, but the following problem occurred when I was about to use the ModelSpeedup module to speed up the model.
  
  ```
  device = torch.device("cpu")
  inputs =(torch.LongTensor([tokenizer_out['input_ids']]).to(device),torch.LongTensor([tokenizer_out['attention_mask']]).to(device))
  ModelSpeedup(S_model, inputs, masks).speedup_model()
  ```
  
  ```
  config_list = [{
          'sparsity_per_layer': 0.5,
          'op_types': ['Linear']
      }, {
          'exclude': True,
          'op_names': ['dense2']
      }]
  ```
  ```
  bert_model.transformer.layer.0.attention.q_lin  sparsity :  0.5
  bert_model.transformer.layer.0.attention.k_lin  sparsity :  0.5
  bert_model.transformer.layer.0.attention.v_lin  sparsity :  0.5
  bert_model.transformer.layer.0.attention.out_lin  sparsity :  0.5
  bert_model.transformer.layer.0.ffn.lin1  sparsity :  0.5
  bert_model.transformer.layer.0.ffn.lin2  sparsity :  0.5
  bert_model.transformer.layer.1.attention.q_lin  sparsity :  0.5
  bert_model.transformer.layer.1.attention.k_lin  sparsity :  0.5
  bert_model.transformer.layer.1.attention.v_lin  sparsity :  0.5
  bert_model.transformer.layer.1.attention.out_lin  sparsity :  0.5
  bert_model.transformer.layer.1.ffn.lin1  sparsity :  0.5
  bert_model.transformer.layer.1.ffn.lin2  sparsity :  0.5
  bert_model.transformer.layer.2.attention.q_lin  sparsity :  0.5
  bert_model.transformer.layer.2.attention.k_lin  sparsity :  0.5
  bert_model.transformer.layer.2.attention.v_lin  sparsity :  0.5
  bert_model.transformer.layer.2.attention.out_lin  sparsity :  0.5
  bert_model.transformer.layer.2.ffn.lin1  sparsity :  0.5
  bert_model.transformer.layer.2.ffn.lin2  sparsity :  0.5
  bert_model.transformer.layer.3.attention.q_lin  sparsity :  0.5
  bert_model.transformer.layer.3.attention.k_lin  sparsity :  0.5
  bert_model.transformer.layer.3.attention.v_lin  sparsity :  0.5
  bert_model.transformer.layer.3.attention.out_lin  sparsity :  0.5
  bert_model.transformer.layer.3.ffn.lin1  sparsity :  0.5
  bert_model.transformer.layer.3.ffn.lin2  sparsity :  0.5
  cpu
  [2022-10-26 08:50:04] start to speedup the model
  no multi-dimension masks found.
  [2022-10-26 08:50:05] infer module masks...
  [2022-10-26 08:50:05] Update mask for bert_model.embeddings.word_embeddings
  [2022-10-26 08:50:06] Update mask for bert_model.embeddings.aten::size.46
  [2022-10-26 08:50:06] Update mask for bert_model.embeddings.aten::slice.47
  [2022-10-26 08:50:06] Slice dim:0, Slice obj:slice(0, 9223372036854775807, 1)
  [2022-10-26 08:50:06] Get attribute: bert_model
  [2022-10-26 08:50:06] Get attribute: embeddings
  [2022-10-26 08:50:06] Get attribute: position_ids
  [2022-10-26 08:50:06] Update mask for bert_model.transformer.layer.0.attention.aten::eq.61
  [2022-10-26 08:50:06] Update mask for bert_model.transformer.layer.1.attention.aten::eq.84
  [2022-10-26 08:50:06] Update mask for bert_model.transformer.layer.2.attention.aten::eq.107
  [2022-10-26 08:50:06] Update mask for bert_model.transformer.layer.3.attention.aten::eq.130
  [2022-10-26 08:50:06] Update mask for bert_model.embeddings.aten::slice.48
  [2022-10-26 08:50:06] Slice dim:1, Slice obj:slice(0, tensor([300]), 1)
  [2022-10-26 08:50:06] Model has Slice operation, and the operand size=torch.Size([1, 512]), Slice object:(slice(None, None, None), slice(0, tensor([300]), 1))
  [2022-10-26 08:50:06] Model has Slice operation, and the operand size=torch.Size([1, 512]), Slice object:(slice(None, None, None), slice(0, tensor([300]), 1))
  [2022-10-26 08:50:06] Update mask for bert_model.embeddings.position_embeddings
  [2022-10-26 08:50:06] Update mask for bert_model.embeddings.aten::add.49
  [2022-10-26 08:50:06] Update mask for bert_model.embeddings.LayerNorm
  [2022-10-26 08:50:06] Update mask for bert_model.embeddings.dropout
  [2022-10-26 08:50:06] Update mask for bert_model.transformer.layer.0.attention.q_lin
  [2022-10-26 08:50:06] Update mask for bert_model.transformer.layer.0.attention.k_lin
  [2022-10-26 08:50:06] Update mask for bert_model.transformer.layer.0.attention.v_lin
  [2022-10-26 08:50:06] Update mask for bert_model.transformer.layer.0.attention.aten::size.50
  [2022-10-26 08:50:06] Update mask for bert_model.transformer.layer.0.attention.aten::size.51
  [2022-10-26 08:50:06] Update mask for bert_model.transformer.layer.0.attention.aten::view.52
  [2022-10-26 08:50:06] WARNING: throw some args away when calling the function "view"
  [2022-10-26 08:50:06] WARNING: throw some args away when calling the function "view"
  [2022-10-26 08:50:06] Update mask for bert_model.transformer.layer.0.attention.aten::view.54
  [2022-10-26 08:50:06] WARNING: throw some args away when calling the function "view"
  [2022-10-26 08:50:06] WARNING: throw some args away when calling the function "view"
  [2022-10-26 08:50:06] Update mask for bert_model.transformer.layer.0.attention.aten::view.56
  [2022-10-26 08:50:06] WARNING: throw some args away when calling the function "view"
  [2022-10-26 08:50:06] WARNING: throw some args away when calling the function "view"
  [2022-10-26 08:50:06] Update mask for bert_model.transformer.layer.0.attention.aten::view.62
  [2022-10-26 08:50:06] WARNING: throw some args away when calling the function "view"
  Traceback (most recent call last):
    File "/workspace/bert2distill_albert/prune_s2_main.py", line 67, in <module>
      prune_student_model(configs, dataManager, logger)
    File "/workspace/bert2distill_albert/engines/prune_distill_model.py", line 112, in prune_student_model
      ModelSpeedup(S_model, inputs, masks).speedup_model()
    File "/root/miniconda3/envs/tf_nlp/lib/python3.8/site-packages/nni/compression/pytorch/speedup/compressor.py", line 543, in speedup_model
      self.infer_modules_masks()
    File "/root/miniconda3/envs/tf_nlp/lib/python3.8/site-packages/nni/compression/pytorch/speedup/compressor.py", line 380, in infer_modules_masks
      self.update_direct_sparsity(curnode)
    File "/root/miniconda3/envs/tf_nlp/lib/python3.8/site-packages/nni/compression/pytorch/speedup/compressor.py", line 247, in update_direct_sparsity
      _auto_infer.update_direct_sparsity()
    File "/root/miniconda3/envs/tf_nlp/lib/python3.8/site-packages/nni/compression/pytorch/speedup/infer_mask.py", line 328, in update_direct_sparsity
      self.random_init()
    File "/root/miniconda3/envs/tf_nlp/lib/python3.8/site-packages/nni/compression/pytorch/speedup/infer_mask.py", line 138, in random_init
      randomize_tensor(tensor, start, end)
    File "/root/miniconda3/envs/tf_nlp/lib/python3.8/site-packages/nni/compression/pytorch/utils/utils.py", line 72, in randomize_tensor
      torch.randint(int(start), int(end), tensor.size(),
  RuntimeError: to - 1 is out of bounds for bool
  
  ```
  
  
  **Environment**:
  - NNI version:2.9
  - Training service (local|remote|pai|aml|etc):
  - Client OS:
  - Server OS (for remote mode only):
  - Python version:3.8
  - PyTorch/TensorFlow version:1.12.1
  - Is conda/virtualenv/venv used?:
  - Is running in Docker?:
  
  
  **Configuration**:
   - Experiment config (remember to remove secrets!):
   - Search space:
  
  
  **Log message**:
   - nnimanager.log:
   - dispatcher.log:
   - nnictl stdout and stderr:
   
  <!--
  Where can you find the log files:
  LOG: https://github.com/microsoft/nni/blob/master/docs/en_US/Tutorial/HowToDebug.md#experiment-root-director
  STDOUT/STDERR: https://nni.readthedocs.io/en/stable/reference/nnictl.html#nnictl-log-stdout
  -->
  
  
  **How to reproduce it?**: