def Show(self): if not self.proto.hyperparams.enable_display: return if self.node1.is_input: if self.conv: visualize.display_convw(self.params['weight'].asarray(), self.proto.receptive_field_width, self.proto.display_rows, self.proto.display_cols, self.conv_filter_fig, title=self.name) visualize.display_hidden(self.params['weight'].asarray(), self.fig, title=self.name) else: if len(self.node1.proto.shape) < 3: visualize.display_wsorted(self.params['weight'].asarray(), self.proto.receptive_field_width, self.proto.display_rows, self.proto.display_cols, self.fig, title=self.name) else: visualize.display_convw(self.params['weight'].asarray().T, self.proto.receptive_field_width, self.proto.display_rows, self.proto.display_cols, self.fig, title=self.name)
def Show(self, train=False): """Displays useful statistics about the model.""" if not self.proto.hyperparams.enable_display: return """ if self.is_input and hasattr(self, 'neg_state'): visualize.display_w(self.neg_state.asarray(), self.proto.shape[0], 10, self.batchsize/10, self.fig, title='neg particles') elif self.is_input: if len(self.proto.shape) == 3: edge = self.outgoing_edge[0] visualize.display_convw(self.state.asarray().T, self.proto.shape[0], 16, self.batchsize/16, self.fig, title=self.name) else: visualize.display_w(self.state.asarray(), self.proto.shape[0], 10, self.batchsize/10, self.fig, title='data') else: """ f = 1 if self.hyperparams.dropout and not train: f = 1 / (1 - self.hyperparams.dropout_prob) if self.is_input: visualize.display_hidden(self.data.asarray(), self.fig, title=self.name) else: visualize.display_hidden(f * self.state.asarray(), self.fig, title=self.name)
def Show(self, train=False): """Displays useful statistics about the model.""" if not self.proto.hyperparams.enable_display: return f = 1 if self.hyperparams.dropout and not train: f = 1 / (1 - self.hyperparams.dropout_prob) if self.is_input: visualize.display_hidden(self.data.asarray(), self.fig, title=self.name) else: visualize.display_hidden(f*self.state.asarray(), self.fig, title=self.name)
def Show(self): if not self.proto.hyperparams.enable_display: return """ if self.is_input and hasattr(self, 'neg_state'): visualize.display_w(self.neg_state.asarray(), self.proto.shape[0], 10, self.batchsize/10, self.fig, title='neg particles') elif self.is_input: if len(self.proto.shape) == 3: edge = self.outgoing_edge[0] visualize.display_convw(self.state.asarray().T, self.proto.shape[0], 16, self.batchsize/16, self.fig, title=self.name) else: visualize.display_w(self.state.asarray(), self.proto.shape[0], 10, self.batchsize/10, self.fig, title='data') else: """ if self.is_input: visualize.display_hidden(self.data.asarray(), self.fig, title=self.name) else: visualize.display_hidden(self.pos_state.asarray(), 2*self.fig, title=self.name + "_positive") visualize.display_hidden(self.neg_state.asarray(), 2*self.fig_neg, title=self.name + "_negative") #visualize.display_hidden(self.params['bias'].asarray(), 2*self.fig_neg, title=self.name + "_bias") visualize.display_w(self.pos_state.asarray(), self.proto.shape[0], self.batchsize, 1, 2*self.fig+1, title=self.name + "_positive", vmin=0, vmax=1) visualize.display_w(self.neg_sample.asarray(), self.proto.shape[0], self.batchsize, 1, 2*self.fig_neg+1, title=self.name + "_negative", vmin=0, vmax=1) """
def Show(self): if not self.proto.hyperparams.enable_display: return """ if self.is_input and hasattr(self, 'neg_state'): visualize.display_w(self.neg_state.asarray(), self.proto.shape[0], 10, self.batchsize/10, self.fig, title='neg particles') elif self.is_input: if len(self.proto.shape) == 3: edge = self.outgoing_edge[0] visualize.display_convw(self.state.asarray().T, self.proto.shape[0], 16, self.batchsize/16, self.fig, title=self.name) else: visualize.display_w(self.state.asarray(), self.proto.shape[0], 10, self.batchsize/10, self.fig, title='data') else: """ if self.is_input: visualize.display_hidden(self.data.asarray(), self.fig, title=self.name) else: visualize.display_hidden(self.pos_state.asarray(), 2 * self.fig, title=self.name + "_positive") visualize.display_hidden(self.neg_state.asarray(), 2 * self.fig_neg, title=self.name + "_negative") #visualize.display_hidden(self.params['bias'].asarray(), 2*self.fig_neg, title=self.name + "_bias") visualize.display_w(self.pos_state.asarray(), self.proto.shape[0], self.batchsize, 1, 2 * self.fig + 1, title=self.name + "_positive", vmin=0, vmax=1) visualize.display_w(self.neg_sample.asarray(), self.proto.shape[0], self.batchsize, 1, 2 * self.fig_neg + 1, title=self.name + "_negative", vmin=0, vmax=1) """