4a9836127987a39832d1a6f9da7e0cc925423d50,texar/models/seq2seq/seq2seq_base.py,Seq2seqBase,__init__,#Seq2seqBase#Any#Any#Any#Any#Any#Any#Any#Any#,21
Before Change
ModelBase.__init__(hparams)
self._src_vocab_size = source_vocab_size
if source_vocab_size is None:
if source_embedder is None:
raise ValueError("Either `source_vocab_size` or "
"`source_embedder` must be given.")
self._src_vocab_size = source_embedder.num_embeds
self._tgt_vocab_size = target_vocab_size
if target_vocab_size is None:
if target_embedder is not None:
self._tgt_vocab_size = target_embedder.num_embeds
After Change
self._src_vocab = source_vocab
if source_embedder is not None:
if self._src_vocab.size != source_embedder.num_embeds:
raise ValueError(
"source vocab size ({}) does not match the source embedder "
"size ({}).".format(self._src_vocab.size,
source_embedder.num_embeds))
self._tgt_vocab = target_vocab or self._src_vocab
if target_embedder is not None:
if self._tgt_vocab.size != target_embedder.num_embeds:
raise ValueError(
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 11
Instances
Project Name: asyml/texar
Commit Name: 4a9836127987a39832d1a6f9da7e0cc925423d50
Time: 2018-07-31
Author: zhiting.hu@petuum.com
File Name: texar/models/seq2seq/seq2seq_base.py
Class Name: Seq2seqBase
Method Name: __init__
Project Name: luispedro/mahotas
Commit Name: 7b4435c4bb501ae4ebe8cead737fd91e4abe935e
Time: 2013-11-26
Author: luis@luispedro.org
File Name: mahotas/morph.py
Class Name:
Method Name: get_structuring_elem
Project Name: analysiscenter/batchflow
Commit Name: 0865fcda8279c3cf5cc59bff903e21d9478a059c
Time: 2020-11-22
Author: akoriagin@nes.ru
File Name: batchflow/sampler.py
Class Name: TruncateSampler
Method Name: sample
Project Name: dask/dask-ml
Commit Name: 68c9bab4a5c6821c2a4395763c676ba796406c49
Time: 2020-08-17
Author: TomAugspurger@users.noreply.github.com
File Name: dask_ml/preprocessing/_encoders.py
Class Name: OneHotEncoder
Method Name: _transform