def input_types(self): """Input types definitions for AnguarLoss. """ return { "logits": NeuralType(('B', 'D'), LogitsType()), "labels": NeuralType(('B',), LabelsType()), }
def output_types(self): return OrderedDict({ "logits": NeuralType(('B', 'D'), LogitsType()), "embs": NeuralType(('B', 'D'), AcousticEncodedRepresentation()), })
def input_ports(self): """Returns definitions of module input ports. """ return { "logits": NeuralType(axes=('B', 'D'), elements_type=LogitsType()), "labels": NeuralType(axes=tuple('B'), elements_type=LabelsType()), }
def input_types(self): """Returns definitions of module input ports. """ return { "logits": NeuralType(('B', 'D'), LogitsType()), "labels": NeuralType(('B'), LabelsType()) }
def output_types(self) -> Optional[Dict[str, NeuralType]]: """ Returns definitions of module output ports. """ if not self.log_softmax: return {"logits": NeuralType(('B', 'T', 'C'), LogitsType())} else: return {"log_probs": NeuralType(('B', 'T', 'C'), LogprobsType())}
def input_types(self): """Returns definitions of module input ports. """ return { "logits": NeuralType(('B', 'T', 'D'), LogitsType()), "start_positions": NeuralType(tuple('B'), ChannelType()), "end_positions": NeuralType(tuple('B'), ChannelType()), }
def input_ports(self): """Returns definitions of module input ports. """ return { # "logits": NeuralType({0: AxisType(BatchTag), 1: AxisType(ChannelTag), 2: AxisType(ChannelTag)}), # "labels": NeuralType({0: AxisType(BatchTag), 1: AxisType(ChannelTag)}), "logits": NeuralType(('B', 'D', 'D'), LogitsType()), "labels": NeuralType(('B', 'D'), LabelsType()), }
def output_types(self) -> Optional[Dict[str, NeuralType]]: """ Returns definitions of module output ports. """ return { "logits": NeuralType(('B', 'T'), LogitsType()), 'hidden_states': NeuralType(('B', 'T', 'C'), ChannelType()), }
def output_ports(self): """Returns definitions of module output ports. point_outputs: outputs of the generator gate_outputs: outputs of gating heads """ # return { # 'point_outputs': NeuralType( # {0: AxisType(BatchTag), 1: AxisType(TimeTag), 2: AxisType(ChannelTag), 3: AxisType(ChannelTag)} # ), # 'gate_outputs': NeuralType({0: AxisType(BatchTag), 1: AxisType(ChannelTag), 2: AxisType(ChannelTag)}), # } return { 'point_outputs': NeuralType(('B', 'T', 'D', 'D'), LogitsType()), 'gate_outputs': NeuralType(('B', 'D', 'D'), LogitsType()), }
def output_ports(self): """Return definitions of module output ports. Returns: Module output ports. """ return { # Variant type 'output_logit': NeuralType(('B', 'D'), LogitsType()), }
def input_types(self): """Returns definitions of module input ports. logit_intent_status: Output of SGD model intent_status: intent label logit_req_slot_status: Output of SGD model requested_slot_status: Takes value 1 if the corresponding slot is requested, 0 otherwise logit_cat_slot_status: Output of SGD model categorical_slot_status: The status of each categorical slot in the service logit_cat_slot_value_status: Output of SGD model categorical_slot_value_status: Takes value 1 if the corresponding slot value is correct, 0 otherwise logit_noncat_slot_status: Output of SGD model noncategorical_slot_status: The status of each noncategorical slot in the service\ logit_spans: Output of SGD model noncategorical_slot_value_start: The index of the starting subword corresponding to the slot span for a non-categorical slot value noncategorical_slot_value_end: The index of the ending (inclusive) subword corresponding to the slot span for a non-categorical slot value task_mask: Mask contains 1 if its the current task, 0 otherwise """ return { "logit_intent_status": NeuralType(('B', 'T'), LogitsType()), "intent_status": NeuralType(('B'), LabelsType()), "logit_req_slot_status": NeuralType(('B', 'T'), LogitsType()), "requested_slot_status": NeuralType(('B'), LabelsType()), "logit_cat_slot_status": NeuralType(('B', 'T'), LogitsType()), "categorical_slot_status": NeuralType(('B'), LabelsType()), "logit_cat_slot_value_status": NeuralType(('B', 'T'), LogitsType()), "categorical_slot_value_status": NeuralType(('B'), LabelsType()), "logit_noncat_slot_status": NeuralType(('B', 'T'), LogitsType()), "noncategorical_slot_status": NeuralType(('B'), LabelsType()), "logit_spans": NeuralType(('B', 'T', 'D'), LogitsType()), "noncategorical_slot_value_start": NeuralType(('B'), LabelsType()), "noncategorical_slot_value_end": NeuralType(('B'), LabelsType()), "task_mask": NeuralType(('B', 'T'), ChannelType()), }
def input_ports(self): """Returns definitions of module input ports. """ return { "logits": NeuralType(['B'] + ['ANY'] * (self._logits_dim - 1), LogitsType()), "labels": NeuralType(['B'] + ['ANY'] * (self._logits_dim - 2), LabelsType()), "loss_mask": NeuralType(['B'] + ['ANY'] * (self._logits_dim - 2), MaskType(), optional=True), }
def input_types(self): """Returns definitions of module input ports. """ return { "logits": NeuralType(["B"] + ["ANY"] * (self._logits_dim - 1), LogitsType()), "labels": [ NeuralType(["B"] + ["ANY"] * (self._logits_dim - 2), LabelsType()) ], "loss_mask": NeuralType(["B"] + ["ANY"] * (self._logits_dim - 2), MaskType(), optional=True), }
def input_ports(self): """Returns definitions of module input ports. logits: 4d tensor of logits labels: 3d tensor of labels loss_mask: specifies the words to be considered in the loss calculation """ return { "logits": NeuralType(('B', 'T', 'D', 'D'), LogitsType()), "labels": NeuralType(('B', 'D', 'T'), LabelsType()), "length_mask": NeuralType(('B', 'D'), LengthsType()), }
def output_types(self) -> Optional[Dict[str, NeuralType]]: """ Returns definitions of module output ports. """ return { "logit_intent_status": NeuralType(('B', 'T'), LogitsType()), #'B' "logit_req_slot_status": NeuralType(('B', 'T'), LogitsType()), #'B' "logit_cat_slot_status": NeuralType(('B', 'T'), LogitsType()), "logit_cat_slot_value_status": NeuralType(('B', 'T'), LogitsType()), #'B' "logit_noncat_slot_status": NeuralType(('B', 'T'), LogitsType()), "logit_spans": NeuralType(('B', 'T', 'D'), LogitsType()), }
def input_ports(self): """Returns definitions of module input ports. logits: 4d tensor of logits targets: 3d tensor of labels loss_mask: specifies the words to be considered in the loss calculation """ return { # "logits": NeuralType( # {0: AxisType(BatchTag), 1: AxisType(TimeTag), 2: AxisType(ChannelTag), 3: AxisType(ChannelTag)} # ), # "targets": NeuralType({0: AxisType(BatchTag), 1: AxisType(ChannelTag), 2: AxisType(TimeTag)}), # "loss_mask": NeuralType({0: AxisType(BatchTag), 1: AxisType(ChannelTag)}), "logits": NeuralType(('B', 'T', 'D', 'D'), LogitsType()), "targets": NeuralType(('B', 'D', 'T'), LabelsType()), "loss_mask": NeuralType(('B', 'D'), LengthsType()), }
def output_ports(self): """ Returns definitions of module output ports. """ # Return neural type. if self._return_feature_maps: return { "outputs": NeuralType( axes=( AxisType(kind=AxisKind.Batch), AxisType(kind=AxisKind.Channel, size=self._feature_map_depth), AxisType(kind=AxisKind.Height, size=self._feature_map_height), AxisType(kind=AxisKind.Width, size=self._feature_map_width), ), elements_type=ImageFeatureValue(), ) } else: return { "outputs": NeuralType( axes=(AxisType(kind=AxisKind.Batch), AxisType(kind=AxisKind.Any, size=self._output_size),), elements_type=LogitsType(), ) }
def output_types(self) -> Optional[Dict[str, NeuralType]]: return { "intent_logits": NeuralType(('B', 'D'), LogitsType()), "slot_logits": NeuralType(('B', 'T', 'D'), LogitsType()), }
def output_types(self): return OrderedDict({"logits": NeuralType(('B', 'D'), LogitsType())})
def output_types(self) -> Optional[Dict[str, NeuralType]]: if not self.log_softmax: return {"logits": NeuralType(('B', 'D'), LogitsType())} else: return {"log_probs": NeuralType(('B', 'D'), LogprobsType())}
def output_types(self) -> Optional[Dict[str, NeuralType]]: return { "punct_logits": NeuralType(('B', 'T', 'C'), LogitsType()), "capit_logits": NeuralType(('B', 'T', 'C'), LogitsType()), }
def output_types(self) -> Optional[Dict[str, NeuralType]]: return {"logits": NeuralType(('B', 'D'), LogitsType())}