PetrochukM / PyTorch-NLP

Basic Utilities for PyTorch Natural Language Processing (NLP)
https://pytorchnlp.readthedocs.io
BSD 3-Clause "New" or "Revised" License
2.21k stars 258 forks source link

Update ``pad_tensor`` and ``pad_batch`` #30

Closed PetrochukM closed 6 years ago

PetrochukM commented 6 years ago

Updated pad_tensor and pad_batch to support padding arbitrary shape tensors.

codecov-io commented 6 years ago

Codecov Report

Merging #30 into master will increase coverage by <.01%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #30      +/-   ##
==========================================
+ Coverage   94.63%   94.64%   +<.01%     
==========================================
  Files          55       55              
  Lines        1528     1530       +2     
==========================================
+ Hits         1446     1448       +2     
  Misses         82       82
Impacted Files Coverage Δ
torchnlp/utils.py 93.2% <100%> (+0.13%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 588c340...55be8dc. Read the comment docs.