MCPcopy Create free account
hub / github.com/cfiltnlp/MUStARD_Plus_Plus / get_command

Function get_command

MPP_Code/training/execute_regression.py:323–374  ·  view source on GitHub ↗

This method is used to create the COMMAND to execute the forward method of particular model, Depending upon the input combination Args: input_modes: Input Modality {VTA, VT, VA, TA, V, T, A} context_flag : If true then

(input_modes, context_flag, speaker_flag)

Source from the content-addressed store, hash-verified

321
322
323def get_command(input_modes, context_flag, speaker_flag):
324 """
325 This method is used to create the COMMAND to execute the forward method of particular model,
326 Depending upon the input combination
327 Args:
328 input_modes:
329 Input Modality {VTA, VT, VA, TA, V, T, A}
330 context_flag :
331 If true then "with context" else "without context"
332 speaker_flag:
333 if true then Speaker dependent else Speaker INdependent
334 """
335 if input_modes == 'VTA':
336 COMMAND = "mod(**{'uA':uVideo, 'uB':uText, 'uC':uAudio"
337 if context_flag == 'y':
338 COMMAND += ",'cA':cVideo, 'cB':cText, 'cC':cAudio"
339
340 elif input_modes == 'VT':
341 COMMAND = "mod(**{'uA':uVideo, 'uB':uText"
342 if context_flag == 'y':
343 COMMAND += ",'cA':cVideo, 'cB':cText"
344
345 elif input_modes == 'VA':
346 COMMAND = "mod(**{'uA':uVideo, 'uB':uAudio"
347 if context_flag == 'y':
348 COMMAND += ",'cA':cVideo, 'cB':cAudio"
349
350 elif input_modes == 'TA':
351 COMMAND = "mod(**{'uA':uText, 'uB':uAudio"
352 if context_flag == 'y':
353 COMMAND += ",'cA':cText, 'cB':cAudio"
354
355 elif input_modes == 'T':
356 COMMAND = "mod(**{'uA':uText"
357 if context_flag == 'y':
358 COMMAND += ",'cA':cText"
359
360 elif input_modes == 'V':
361 COMMAND = "mod(**{'uA':uVideo"
362 if context_flag == 'y':
363 COMMAND += ",'cA':cVideo"
364
365 elif input_modes == 'A':
366 COMMAND = "mod(**{'uA':uAudio"
367 if context_flag == 'y':
368 COMMAND += ",'cA':cAudio"
369 if speaker_flag == 'y':
370 COMMAND += ",'speaker_embedding':speaker})"
371 else:
372 COMMAND += "})"
373
374 return COMMAND
375
376
377def get_model_and_parameters(args):

Callers 1

get_model_and_parametersFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected