Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/najoungkim/COGS
/ functions
Functions
775 in github.com/najoungkim/COGS
⨍
Functions
775
◇
Types & classes
138
↳
Endpoints
7
Method
from_opt
Alternative constructor. Args: opt (argparse.Namespace): The parsed arguments.
src/OpenNMT-py/onmt/inputters/datareader_base.py:20
Method
from_opt
Alternate constructor. Subclasses should override this method.
src/OpenNMT-py/onmt/decoders/decoder.py:23
Method
from_opt
Alternate constructor.
src/OpenNMT-py/onmt/decoders/decoder.py:142
Method
from_opt
Alternate constructor.
src/OpenNMT-py/onmt/decoders/cnn_decoder.py:52
Method
from_opt
Alternate constructor.
src/OpenNMT-py/onmt/decoders/transformer.py:249
Function
get_models
()
src/OpenNMT-py/onmt/bin/server.py:40
Function
health
()
src/OpenNMT-py/onmt/bin/server.py:45
Function
image_fields
(**kwargs)
src/OpenNMT-py/onmt/inputters/image_dataset.py:102
Method
imagemodel_forward
Creates an image-to-text nmtmodel with a custom opt function. Forwards a testbatch and checks output size. Args:
src/OpenNMT-py/onmt/tests/test_models.py:143
Function
img_sort_key
Sort using the size of the image: (width, height).
src/OpenNMT-py/onmt/inputters/image_dataset.py:86
Method
init_state
Init decoder state.
src/OpenNMT-py/onmt/decoders/cnn_decoder.py:64
Method
init_state
Initialize decoder state.
src/OpenNMT-py/onmt/decoders/transformer.py:268
Method
init_state
See :obj:`RNNDecoderBase.init_state()`
src/OpenNMT-py/onmt/decoders/ensemble.py:76
Method
initialize
DecodeStrategy subclasses should override :func:`initialize()`. `initialize` should be called before all actions. used to prepare nec
src/OpenNMT-py/onmt/translate/decode_strategy.py:86
Method
is_decreasing
(self, stats)
src/OpenNMT-py/onmt/utils/earlystopping.py:41
Method
is_decreasing
(self, stats)
src/OpenNMT-py/onmt/utils/earlystopping.py:55
Method
is_decreasing
(self, stats)
src/OpenNMT-py/onmt/utils/earlystopping.py:69
Method
is_improving
(self, stats)
src/OpenNMT-py/onmt/utils/earlystopping.py:38
Method
is_improving
(self, stats)
src/OpenNMT-py/onmt/utils/earlystopping.py:52
Method
is_improving
(self, stats)
src/OpenNMT-py/onmt/utils/earlystopping.py:66
Method
is_improving
(self)
src/OpenNMT-py/onmt/utils/earlystopping.py:208
Method
length_average
Returns the current sequence length.
src/OpenNMT-py/onmt/translate/penalties.py:96
Method
length_none
Returns unmodified scores.
src/OpenNMT-py/onmt/translate/penalties.py:100
Method
length_wu
GNMT length re-ranking score. See "Google's Neural Machine Translation System" :cite:`wu2016google`.
src/OpenNMT-py/onmt/translate/penalties.py:88
Method
load_pretrained_vectors
(self, file)
src/OpenNMT-py/onmt/modules/embeddings.py:85
Method
load_pretrained_vectors
Pass in needed options only when modify function definition.
src/OpenNMT-py/onmt/encoders/image_encoder.py:69
Method
load_state_dict
?
src/OpenNMT-py/onmt/utils/optimizers.py:201
Function
load_test_model
(opt, model_path=None)
src/OpenNMT-py/onmt/model_builder.py:91
Method
loaded
(self)
src/OpenNMT-py/onmt/translate/translation_server.py:388
Function
main
(opt, device_id, batch_queue=None, semaphore=None)
src/OpenNMT-py/onmt/train_single.py:42
Function
make_batch_align_matrix
Convert a sparse index_tensor into a batch of alignment matrix, with row normalize to the sum of 1 if set normalize. Args: index
src/OpenNMT-py/onmt/utils/alignment.py:7
Function
make_src
(data, vocab)
src/OpenNMT-py/onmt/inputters/inputter.py:43
Function
make_tgt
(data, vocab)
src/OpenNMT-py/onmt/inputters/inputter.py:53
Method
map_state
(self, fn)
src/OpenNMT-py/onmt/decoders/cnn_decoder.py:69
Method
map_state
(self, fn)
src/OpenNMT-py/onmt/decoders/transformer.py:273
Method
map_state
(self, fn)
src/OpenNMT-py/onmt/decoders/ensemble.py:81
Function
max_tok_len
In token batching scheme, the number of sequences is limited such that the total number of src/tgt tokens (including padding) in a batch
src/OpenNMT-py/onmt/translate/translator.py:46
Function
max_tok_len
In token batching scheme, the number of sequences is limited such that the total number of src/tgt tokens (including padding) in a batch
src/OpenNMT-py/onmt/inputters/inputter.py:849
Method
maybe_item
(x)
src/OpenNMT-py/onmt/translate/translation_server.py:514
Function
model_opts
These options are passed to the construction of the model. Be careful with these as they will be used during translation.
src/OpenNMT-py/onmt/opts.py:18
Function
multi_init
(opt, device_id)
src/OpenNMT-py/onmt/utils/distributed.py:20
Function
newroute
(route, *args, **kwargs)
src/OpenNMT-py/onmt/bin/server.py:20
Method
nmtmodel_forward
Creates a nmtmodel with a custom opt function. Forwards a testbatch and checks output size. Args: opt: Namespace
src/OpenNMT-py/onmt/tests/test_models.py:112
Function
noam_decay
Learning rate schedule described in https://arxiv.org/pdf/1706.03762.pdf.
src/OpenNMT-py/onmt/utils/optimizers.py:137
Function
noamwd_decay
Learning rate schedule optimized for huge batches
src/OpenNMT-py/onmt/utils/optimizers.py:146
Method
noise_batch
(self, batch)
src/OpenNMT-py/onmt/modules/source_noise.py:75
Method
noise_source
(self, source, length=None, **kwargs)
src/OpenNMT-py/onmt/modules/source_noise.py:107
Method
noise_source
(self, source, **kwargs)
src/OpenNMT-py/onmt/modules/source_noise.py:173
Method
noise_source
(self, source, length=None, **kwargs)
src/OpenNMT-py/onmt/modules/source_noise.py:346
Method
pad
Pad a batch of examples to the length of the longest example. Args: minibatch (List[torch.FloatTensor]): A list of audio data,
src/OpenNMT-py/onmt/inputters/vec_dataset.py:83
Method
padding_idx
(self)
src/OpenNMT-py/onmt/utils/loss.py:92
Method
param_groups
(self)
src/OpenNMT-py/onmt/utils/optimizers.py:176
Function
parse_align_idx
Parse Pharaoh alignment into [[<src>, <tgt>], ...]
src/OpenNMT-py/onmt/inputters/inputter.py:85
Function
pred
Filters batches that belong only to gpu_ranks of current node
src/OpenNMT-py/onmt/bin/train.py:101
Function
preprocess_opts
Pre-procesing options
src/OpenNMT-py/onmt/opts.py:228
Function
process_one_shard
(corpus_params, params)
src/OpenNMT-py/onmt/bin/preprocess.py:48
Method
read
Read data from file system and yield as dicts.
src/OpenNMT-py/onmt/inputters/datareader_base.py:43
Function
rsqrt_decay
Decay based on the reciprocal of the step square root.
src/OpenNMT-py/onmt/utils/optimizers.py:163
Function
run
Process a disjoint subset of the videos on each device.
src/OpenNMT-py/tools/vid_feature_extractor.py:187
Function
run
run process
src/OpenNMT-py/onmt/bin/train.py:144
Method
run
Translate `inputs` We keep the same format as the Lua version i.e. ``[{"id": model_id, "src": "sequence to translate"},{ ...}]``
src/OpenNMT-py/onmt/translate/translation_server.py:201
Function
saver
(out_path, feats_queue, finished_queue)
src/OpenNMT-py/tools/vid_feature_extractor.py:216
Method
score
(self, beam, scores)
src/OpenNMT-py/onmt/tests/test_beam_search.py:23
Function
scorers_from_opts
(opt)
src/OpenNMT-py/onmt/utils/earlystopping.py:86
Method
setUpClass
(cls)
src/OpenNMT-py/onmt/tests/test_image_dataset.py:39
Method
setUpClass
(cls)
src/OpenNMT-py/onmt/tests/test_audio_dataset.py:181
Method
setUpClass
(cls)
src/OpenNMT-py/onmt/tests/test_text_dataset.py:164
Method
set_bias
(self, bias_val=0)
src/OpenNMT-py/onmt/models/sru.py:521
Method
set_bias
(self, bias_val=0)
src/OpenNMT-py/onmt/models/sru.py:616
Method
shape
Projection.
src/OpenNMT-py/onmt/modules/multi_headed_attn.py:121
Method
signal_handler
signal handler
src/OpenNMT-py/onmt/bin/train.py:185
Method
state
?
src/OpenNMT-py/onmt/utils/optimizers.py:193
Method
state_dict
?
src/OpenNMT-py/onmt/utils/optimizers.py:197
Method
step
?
src/OpenNMT-py/onmt/utils/optimizers.py:187
Method
step
(self, closure=None)
src/OpenNMT-py/onmt/utils/optimizers.py:420
Method
step
Performs a single optimization step. Arguments: closure (callable, optional): A closure that reevaluates the model
src/OpenNMT-py/onmt/utils/optimizers.py:582
Method
tearDown
(self)
src/OpenNMT-py/onmt/tests/test_translation_server.py:141
Method
tearDownClass
(cls)
src/OpenNMT-py/onmt/tests/test_image_dataset.py:62
Method
tearDownClass
(cls)
src/OpenNMT-py/onmt/tests/test_audio_dataset.py:203
Method
tearDownClass
(cls)
src/OpenNMT-py/onmt/tests/test_text_dataset.py:171
Method
test_advance_with_all_repeats_gets_blocked
(self)
src/OpenNMT-py/onmt/tests/test_beam_search.py:30
Method
test_advance_with_some_repeats_gets_blocked
(self)
src/OpenNMT-py/onmt/tests/test_beam_search.py:80
Method
test_base_field
(self)
src/OpenNMT-py/onmt/tests/test_text_dataset.py:86
Method
test_beam_advance_against_known_reference
(self)
src/OpenNMT-py/onmt/tests/test_beam_search.py:540
Method
test_beam_advance_against_known_reference
(self)
src/OpenNMT-py/onmt/tests/test_beam_search.py:558
Method
test_beam_is_done_when_n_best_beams_eos_using_min_length
(self)
src/OpenNMT-py/onmt/tests/test_beam_search.py:256
Method
test_beam_returns_attn_with_correct_length
(self)
src/OpenNMT-py/onmt/tests/test_beam_search.py:317
Method
test_copy_gen_forward_shape
(self)
src/OpenNMT-py/onmt/tests/test_copy_generator.py:41
Method
test_copy_gen_outp_has_no_prob_of_pad
(self)
src/OpenNMT-py/onmt/tests/test_copy_generator.py:50
Method
test_copy_gen_trainable_params_update
(self)
src/OpenNMT-py/onmt/tests/test_copy_generator.py:59
Method
test_copy_loss_forward_shape
(self)
src/OpenNMT-py/onmt/tests/test_copy_generator.py:111
Method
test_copy_loss_ignore_index_is_ignored
(self)
src/OpenNMT-py/onmt/tests/test_copy_generator.py:120
Method
test_copy_loss_output_range_is_positive
(self)
src/OpenNMT-py/onmt/tests/test_copy_generator.py:130
Method
test_correct_n_fields
(self)
src/OpenNMT-py/onmt/tests/test_text_dataset.py:93
Method
test_deferred_loading_model_and_unload
(self)
src/OpenNMT-py/onmt/tests/test_translation_server.py:17
Method
test_detokenizing_with_no_tokenizer_fails
(self)
src/OpenNMT-py/onmt/tests/test_translation_server.py:47
Method
test_doesnt_predict_eos_if_shorter_than_min_len
(self)
src/OpenNMT-py/onmt/tests/test_beam_search.py:199
Method
test_doesnt_predict_eos_if_shorter_than_min_len
(self)
src/OpenNMT-py/onmt/tests/test_greedy_search.py:14
Method
test_embeddings_forward_shape
(self)
src/OpenNMT-py/onmt/tests/test_embeddings.py:90
Method
test_embeddings_trainable_params
(self)
src/OpenNMT-py/onmt/tests/test_embeddings.py:98
← previous
next →
601–700 of 775, ranked by callers