def on_switch_btn(self, index):
    if (index == 0):
        self.main_window.watch_choice.show()
        self.main_window.show_remove_btn.hide()
        self.main_window.hd_all_btn.hide()
        self.main_window.showbtn.hide()
        self.main_window.watch_com.show()
        self.main_window.tensor_label.show()
        self.main_window.tensor_label.setText(('Shape:  ' + self.tensor_select_list[0].shape_str))
        self.main_window.tensor_shape_input.show()
        self.main_window.reshape_inlb.show()
        self.main_window.tensor_shape_input.clear()
        self.main_window.tensor_reshape_label.hide()
    else:
        self.main_window.watch_choice.hide()
        self.main_window.show_remove_btn.show()
        self.main_window.hd_all_btn.show()
        self.main_window.watch_com.hide()
        self.main_window.tensor_shape_input.hide()
        if (self.tensor_watch_list != []):
            self.main_window.showbtn.show()
            self.main_window.tensor_label.show()
            self.main_window.tensor_reshape_label.show()
            self.main_window.tensor_label.setText(('Shape:  ' + self.tensor_watch_list[0].shape_str))
            self.main_window.tensor_reshape_label.setText((('Reshape:   (' + str(self.tensor_watch_list[0].get_reshape_str())) + ')'))
            if (self.tensor_watch_list[0].showstate == True):
                self.main_window.showbtn.setChecked(True)
            else:
                self.main_window.showbtn.setChecked(False)
        else:
            self.main_window.showbtn.hide()
            self.main_window.tensor_label.hide()
            self.main_window.tensor_reshape_label.hide()
        self.main_window.reshape_inlb.hide()
def on_switch_btn(self, index):
    if (index == 0):
        self.main_window.watch_choice.show()
        self.main_window.show_remove_btn.hide()
        self.main_window.hd_all_btn.hide()
        self.main_window.showbtn.hide()
        self.main_window.watch_com.show()
        self.main_window.tensor_label.show()
        self.main_window.tensor_label.setText(('Shape:  ' + self.tensor_select_list[0].shape_str))
        self.main_window.tensor_shape_input.show()
        self.main_window.reshape_inlb.show()
        self.main_window.tensor_shape_input.clear()
        self.main_window.tensor_reshape_label.hide()
    else:
        self.main_window.watch_choice.hide()
        self.main_window.show_remove_btn.show()
        self.main_window.hd_all_btn.show()
        self.main_window.watch_com.hide()
        self.main_window.tensor_shape_input.hide()
        if (self.tensor_watch_list != []):
            self.main_window.showbtn.show()
            self.main_window.tensor_label.show()
            self.main_window.tensor_reshape_label.show()
            self.main_window.tensor_label.setText(('Shape:  ' + self.tensor_watch_list[0].shape_str))
            self.main_window.tensor_reshape_label.setText((('Reshape:   (' + str(self.tensor_watch_list[0].get_reshape_str())) + ')'))
            if (self.tensor_watch_list[0].showstate == True):
                self.main_window.showbtn.setChecked(True)
            else:
                self.main_window.showbtn.setChecked(False)
        else:
            self.main_window.showbtn.hide()
            self.main_window.tensor_label.hide()
            self.main_window.tensor_reshape_label.hide()
        self.main_window.reshape_inlb.hide()