def set_model(self, model_type): self.model_type = model_type if self.model_type == "CNN": from modules.model import model self.model = model(self.helpers) elif self.model_type == "IR": from modules.model_openvino import model_openvino self.model = model_openvino(self.helpers)
def step(hparams, tokens, past=None): lm_output = model.model(hparams=hparams, X=tokens, past=past, reuse=tf.AUTO_REUSE) logits = lm_output['logits'][:, :, :hparams.n_vocab] presents = lm_output['present'] presents.set_shape( model.past_shape(hparams=hparams, batch_size=batch_size)) return { 'logits': logits, 'presents': presents, }
def set_model(self, mtype): self.model_type = mtype if self.model_type == "CNN": self.model = model(self.helpers)
def set_model(self, mtype): self.model = model(self.helpers)
def set_model(self, mtype): # Inititializes the TassAI model self.model = model(self.helpers)