text: Title: Some Doc2Vec vectors remain untrained, with either giant #s of docvecs or small contrived corpuses
  Body: Investigating the user report at <https://groups.google.com/d/msg/gensim/XbH5Sr6RBcI/w5-AIwpSAwAJ>, I ran with a (much-smaller) version of the synthetic-corpus there, & reproduced similarly inexplicable results, with doc-vectors that *should* have received at least *some* training-adjustment showing no change after an epoch of training. 
  
  To demonstrate:
  
  ```python
  import logging
  logging.root.setLevel(level=logging.INFO)
  from gensim.models.doc2vec import TaggedDocument
  from gensim.models import Doc2Vec
  import numpy as np
  import inspect
  
  class DummyTaggedDocuments(object):
  
      def __init__(self, count=1001, shared_word=True, doc_word=True, digit_words=False):
          self.count = count
          self.shared_word = shared_word
          self.doc_word = doc_word
          self.digit_words = digit_words
          
      def __iter__(self):
          for i in range(self.count):
              words = []
              if self.shared_word:
                  words += ['shared']
              if self.doc_word: 
                  words += ['doc_'+str(i)]
              if self.digit_words:
                  words += str(i)  
              tags = [i]
              if i == self.count - 1:
                  logging.info("yielding last DummyTaggedDocument %i", i)
              yield TaggedDocument(words=words, tags=tags)
  
  def test_d2v_docvecs_trained(doc_args={}, d2v_args={}):
      """Demo bug in Doc2Vec (& more?) as of gensim 3.8.1 with sample>0"""
      docs = DummyTaggedDocuments(**doc_args)
      d2v_model = Doc2Vec(**d2v_args)
      
      d2v_model.build_vocab(docs, progress_per=100000)
      starting_vecs = d2v_model.docvecs.vectors_docs.copy()  
      
      d2v_model.train(docs, total_examples=d2v_model.corpus_count, epochs=d2v_model.epochs, report_delay=5)
      
      unchanged = np.all(starting_vecs==d2v_model.docvecs.vectors_docs, axis=1)
      unchanged_indexes = np.argwhere(unchanged)
      
      return (len(unchanged_indexes), list(unchanged_indexes))
  
  test_d2v_docvecs_trained(d2v_args=dict(min_count=0, sample=0.01, vector_size=4, epochs=1, workers=1))
  ```
  
  The return value of this test method should, for the given parameters, be a count of 0 unchanged vectors, and and empty-list of unchanged vector indexes. But in a typical run I'm getting instead:
  
  ```
  (12,
   [array([0]),
    array([1]),
    array([4]),
    array([6]),
    array([9]),
    array([11]),
    array([13]),
    array([14]),
    array([15]),
    array([30]),
    array([33]),
    array([80])])
  ```
  
  Though this is an artificial dataset, with peculiar 2-word documents, which will often only be 1-word documents (after frequent-word-downsampling of the term shared by all documents) – every document should be at least 1 word long, and thus get at least some training in any single epoch. The logging output regarding sampling accurately reports what the effects *should* be (at this sampling level):
  
  ```
  INFO:gensim.models.doc2vec:collected 1002 word types and 1001 unique tags from a corpus of 1001 examples and 2002 words
  INFO:gensim.models.word2vec:Loading a fresh vocabulary
  INFO:gensim.models.word2vec:effective_min_count=0 retains 1002 unique words (100% of original 1002, drops 0)
  INFO:gensim.models.word2vec:effective_min_count=0 leaves 2002 word corpus (100% of original 2002, drops 0)
  INFO:gensim.models.word2vec:deleting the raw counts dictionary of 1002 items
  INFO:gensim.models.word2vec:sample=0.01 downsamples 1 most-common words
  INFO:gensim.models.word2vec:downsampling leaves estimated 1162 word corpus (58.1% of prior 2002)
  ``` 
  
  I get similar evidence of unchanged vectors in `dm=0` (PV-DBOW) mode. However, running more epochs usually drives the number of unchanged vectors to 0. 
  
  Turning off downsampling with `sample=0` ensures all vectors show some update, implying some error in the downsampling is involved. Essentially, that strongly implies something going wrong in  the code at or around:
  
  https://github.com/RaRe-Technologies/gensim/blob/3d6596112f8f1fc0e839a32c5a00ef3d7365c264/gensim/models/doc2vec_inner.pyx#L344
  
  But, a manual check of the precalculated `sample_int` values for all-but-the-most-frequent word suggests they're where they should be: a value that the random-int is never higher-than, and thus a value that should result in the corresponding words never being down-sampled. 
  
  I may not have time to dig deeper anytime soon, so placing this recipe-to-reproduce & key observations so far here. 
  
  Notably, `Word2Vec` & `FastText` may be using similar sampling logic – so even though there's not yet a sighting there, similar issues may exist. 
  
  (Separately, I somewhat doubt this sample-related anomaly, whatever its cause, is necessarily related to actual original problem of the user in the thread referenced – which seemed only present in extremely large corpuses, likely with real many-word texts, over a normal number of repeated epochs, and perhaps only in the "very tail-end" doc-vectors.)
  
  
  