示例#1
0
 def output_ports(self):
     """Returns definitions of module output ports.
     """
     return {
         "punct_logits": NeuralType(('B', 'T', 'D'), LogitsType()),
         "capit_logits": NeuralType(('B', 'T', 'D'), LogitsType()),
     }
    def output_ports(self):
        """Returns definitions of module output ports.

        intent_logits:
            TODO
        slot_logits:
            TODO
        """
        return {
            "intent_logits": NeuralType(('B', 'D'), LogitsType()),
            "slot_logits": NeuralType(('B', 'T', 'D'), LogitsType()),
        }
示例#3
0
    def input_ports(self):
        """Returns definitions of module input ports.

        """
        return {
            # "intent_logits": NeuralType({0: AxisType(BatchTag), 1: AxisType(ChannelTag)}),
            # "slot_logits": NeuralType({0: AxisType(BatchTag), 1: AxisType(TimeTag), 2: AxisType(ChannelTag)}),
            # "loss_mask": NeuralType({0: AxisType(BatchTag), 1: AxisType(TimeTag)}),
            # "intents": NeuralType({0: AxisType(BatchTag)}),
            # "slots": NeuralType({0: AxisType(BatchTag), 1: AxisType(TimeTag)}),
            "intent_logits": NeuralType(('B', 'D'), LogitsType()),
            "slot_logits": NeuralType(('B', 'T', 'D'), LogitsType()),
            "loss_mask": NeuralType(('B', 'T'), ChannelType()),
            "intents": NeuralType(tuple('B'), ChannelType()),
            "slots": NeuralType(('B', 'T'), ChannelType()),
        }
 def input_ports(self):
     """Returns definitions of module input ports.
     """
     return {
         "logits": NeuralType(('B', 'T', 'D'), LogitsType()),
         "labels": NeuralType(('B', 'T'), LabelsType()),
         "output_mask": NeuralType(('B', 'T'), MaskType(), optional=True),
     }
示例#5
0
 def input_ports(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()),
     }
示例#6
0
 def input_ports(self):
     """Returns definitions of module input ports.
     """
     return {
         # "logits": NeuralType({0: AxisType(BatchTag), 1: AxisType(TimeTag), 2: AxisType(ChannelTag)}),
         # "target_ids": NeuralType({0: AxisType(BatchTag), 1: AxisType(TimeTag)}),
         "logits": NeuralType(('B', 'T', 'D'), LogitsType()),
         "target_ids": NeuralType(('B', 'T'), LabelsType()),
     }
示例#7
0
 def input_ports(self):
     """Returns definitions of module input ports.
     """
     return {
         # "logits": NeuralType({0: AxisType(BatchTag), 1: AxisType(TimeTag), 2: AxisType(ChannelTag)}),
         # "start_positions": NeuralType({0: AxisType(BatchTag)}),
         # "end_positions": NeuralType({0: AxisType(BatchTag)}),
         "logits": NeuralType(('B', 'T', 'D'), LogitsType()),
         "start_positions": NeuralType(tuple('B'), ChannelType()),
         "end_positions": NeuralType(tuple('B'), ChannelType()),
     }
示例#8
0
    def output_ports(self):
        """Returns definitions of module output ports.

        intent_logits:
            0: AxisType(BatchTag)

            1: AxisType(ChannelTag)

        slot_logits:
            0: AxisType(BatchTag)

            1: AxisType(TimeTag)

            2: AxisType(ChannelTag)
        """
        return {
            # "intent_logits": NeuralType({0: AxisType(BatchTag), 1: AxisType(ChannelTag)}),
            # "slot_logits": NeuralType({0: AxisType(BatchTag), 1: AxisType(TimeTag), 2: AxisType(ChannelTag)}),
            "intent_logits": NeuralType(('B', 'D'), LogitsType()),
            "slot_logits": NeuralType(('B', 'T', 'D'), LogitsType()),
        }
示例#9
0
 def input_ports(self):
     """Returns definitions of module input ports.
         logit_intent_status (float): Output of SGD model
         intent_status_labels (int): Intent labels
         logit_req_slot_status (float): Output of SGD model
         requested_slot_status (float): Takes value 1 if the corresponding slot is requested, 0 otherwise
         req_slot_mask (bool): Masks requested slots not used for the particular service
         logit_cat_slot_status (float): Output of SGD model
         categorical_slot_status (int): The status of each categorical slot in the service
         cat_slot_status_mask (bool): Masks categorical slots not used for the particular service
         logit_cat_slot_value (float): Output of SGD model
         categorical_slot_values (int): The index of the correct value for each categorical slot
         logit_noncat_slot_status (float): Output of SGD model
         noncategorical_slot_status (int): The status of each noncategorical slot in the service
         noncat_slot_status_mask (bool): masks noncategorical slots not used for the particular service
         logit_noncat_slot_start (float): Output of SGD model
         logit_noncat_slot_end (float): Output of SGD model
         noncategorical_slot_value_start (int): The index of the starting subword corresponding to the slot span for a non-categorical slot value
         noncategorical_slot_value_end (int): The index of the ending (inclusive) subword corresponding to the slot span for a non-categorical slot value
     """
     return {
         "logit_intent_status": NeuralType(('B', 'T', 'C'), LogitsType()),
         "intent_status_labels": NeuralType(('B'), LabelsType()),
         "logit_req_slot_status": NeuralType(('B', 'T'), LogitsType()),
         "requested_slot_status": NeuralType(('B', 'T'), LabelsType()),
         "req_slot_mask": NeuralType(('B', 'T'), ChannelType()),
         "logit_cat_slot_status": NeuralType(('B', 'T', 'C'), LogitsType()),
         "categorical_slot_status": NeuralType(('B', 'T'), LabelsType()),
         "cat_slot_status_mask": NeuralType(('B', 'T'), ChannelType()),
         "logit_cat_slot_value": NeuralType(('B', 'T', 'C'), LogitsType()),
         "categorical_slot_values": NeuralType(('B', 'T'), LabelsType()),
         "logit_noncat_slot_status": NeuralType(('B', 'T', 'C'),
                                                LogitsType()),
         "noncategorical_slot_status": NeuralType(('B', 'T'), LabelsType()),
         "noncat_slot_status_mask": NeuralType(('B', 'T'), ChannelType()),
         "logit_noncat_slot_start": NeuralType(('B', 'T', 'C'),
                                               LogitsType()),
         "logit_noncat_slot_end": NeuralType(('B', 'T', 'C'), LogitsType()),
         "noncategorical_slot_value_start": NeuralType(('B', 'T'),
                                                       LabelsType()),
         "noncategorical_slot_value_end": NeuralType(('B', 'T'),
                                                     LabelsType()),
     }
示例#10
0
 def output_ports(self):
     """Returns definitions of module output ports.
         logit_intent_status (float): output for intent status
         logit_req_slot_status (float): output for requested slots status
         logit_cat_slot_status (float): output for categorical slots status
         logit_cat_slot_value (float): output for categorical slots values
         logit_noncat_slot_status (float): Output of SGD model
         logit_noncat_slot_start (float): output for non categorical slots values start
         logit_noncat_slot_end (float): output for non categorical slots values end
     """
     return {
         "logit_intent_status": NeuralType(('B', 'T', 'C'), LogitsType()),
         "logit_req_slot_status": NeuralType(('B', 'T'), LogitsType()),
         "logit_cat_slot_status": NeuralType(('B', 'T', 'C'), LogitsType()),
         "logit_cat_slot_value": NeuralType(('B', 'T', 'C'), LogitsType()),
         "logit_noncat_slot_status": NeuralType(('B', 'T', 'C'), LogitsType()),
         "logit_noncat_slot_start": NeuralType(('B', 'T', 'C'), LogitsType()),
         "logit_noncat_slot_end": NeuralType(('B', 'T', 'C'), LogitsType()),
     }
示例#11
0
 def output_ports(self):
     """Returns definitions of module output ports.
     logits: logits before loss
     """
     return {"logits": NeuralType(('B', 'T', 'C'), LogitsType())}
示例#12
0
 def output_ports(self):
     """Returns definitions of module output ports.
     """
     # return {"logits": NeuralType({0: AxisType(BatchTag), 1: AxisType(ChannelTag)})}
     return {"logits": NeuralType(('B', 'D'), LogitsType())}