Example #1
0
    def connect_to(self, prev_layer):
        self.stride_length = 1
        self.height = ((prev_layer.height - self.kernel_size) // self.stride_length) + 1
        self.width  = ((prev_layer.width  - self.kernel_size) // self.stride_length) + 1
        self.n_out = self.depth * self.height * self.width

        self.w = self.init_func((self.depth, prev_layer.depth, self.kernel_size, self.kernel_size),
            prev_layer.n_out, self.n_out)
        self.b = f.zero((self.depth, 1))
Example #2
0
    def connect_to(self, prev_layer):
        self.stride_length = 1
        self.height = (
            (prev_layer.height - self.kernel_size) // self.stride_length) + 1
        self.width = (
            (prev_layer.width - self.kernel_size) // self.stride_length) + 1
        self.n_out = self.depth * self.height * self.width

        self.w = self.init_func(
            (self.depth, prev_layer.depth, self.kernel_size, self.kernel_size),
            prev_layer.n_out, self.n_out)
        self.b = f.zero((self.depth, 1))
Example #3
0
code_entry= ConstrainedEntry(mainframe, width=7, textvariable=code_entered, show="*")
code_entry.delete(0, END)
code_entry.grid(columnspan = 2, column=2, row=5, sticky=(W, E))

#Add buttons to frame using grid layout
ttk.Button(mainframe, text="1", command=lambda: functions.one(code_entry)).grid(column=1, row=1, sticky=NW)
ttk.Button(mainframe, text="2", command=lambda: functions.two(code_entry)).grid(column=2, row=1, sticky=NW)
ttk.Button(mainframe, text="3", command=lambda: functions.three(code_entry)).grid(column=3, row=1, sticky=NW)
ttk.Button(mainframe, text="4", command=lambda: functions.four(code_entry)).grid(column=1, row=2, sticky=NW)
ttk.Button(mainframe, text="5", command=lambda: functions.five(code_entry)).grid(column=2, row=2, sticky=NW)
ttk.Button(mainframe, text="6", command=lambda: functions.six(code_entry)).grid(column=3, row=2, sticky=NW)
ttk.Button(mainframe, text="7", command=lambda: functions.seven(code_entry)).grid(column=1, row=3, sticky=NW)
ttk.Button(mainframe, text="8", command=lambda: functions.eight(code_entry)).grid(column=2, row=3, sticky=NW)
ttk.Button(mainframe, text="9", command=lambda: functions.nine(code_entry)).grid(column=3, row=3, sticky=NW)
ttk.Button(mainframe, text="Clear", command=lambda: functions.clear(code_entry)).grid(column=1, row=4, sticky=NW)
ttk.Button(mainframe, text="0", command=lambda: functions.zero(code_entry)).grid(column=2, row=4, sticky=NW)
ttk.Button(mainframe, text="Delete", command=lambda: functions.delete(code_entry)).grid(column=3, row=4, sticky=NW)

ttk.Button(mainframe, width=12, text="Disable Alarm", command =lambda: alarm.disableCode(code_entry)).grid(column=5, row=4, sticky=SE)
ttk.Button(mainframe, width=12,text="Enable Alarm", command =lambda: alarm.enableCode(code_entry, sensor_option, root)).grid(column=5, row=5, sticky=SE)

ttk.Label(mainframe, text="Alarm Code:").grid(column=1, row=5, sticky=W)
ttk.Label(mainframe, text="Sensor Option:").grid(column =4, row =1, sticky=NE)

sensor_option=Spinbox(mainframe, values=(sensoroptions), textvariable=sensor_choice)
sensor_option.grid(column =5, row =1, sticky=(N,E))

for child in mainframe.winfo_children(): child.grid_configure(padx=5, pady=5)


root.mainloop()
Example #4
0
def zero():
    functions.zero()
    common.send()
Example #5
0
                                                             sticky=NW)
ttk.Button(mainframe, text="8",
           command=lambda: functions.eight(code_entry)).grid(column=2,
                                                             row=3,
                                                             sticky=NW)
ttk.Button(mainframe, text="9",
           command=lambda: functions.nine(code_entry)).grid(column=3,
                                                            row=3,
                                                            sticky=NW)
ttk.Button(mainframe,
           text="Clear",
           command=lambda: functions.clear(code_entry)).grid(column=1,
                                                             row=4,
                                                             sticky=NW)
ttk.Button(mainframe, text="0",
           command=lambda: functions.zero(code_entry)).grid(column=2,
                                                            row=4,
                                                            sticky=NW)
ttk.Button(mainframe,
           text="Delete",
           command=lambda: functions.delete(code_entry)).grid(column=3,
                                                              row=4,
                                                              sticky=NW)

ttk.Button(mainframe,
           width=12,
           text="Disable Alarm",
           command=lambda: Alarm.getCode(code_entry)).grid(column=5,
                                                           row=4,
                                                           sticky=SE)
ttk.Button(mainframe,
Example #6
0
 def connect_to(self, prev_layer):
     self.w = self.init_func((self.n_out, prev_layer.n_out),
                             prev_layer.n_out, self.n_out)
     self.b = f.zero((self.n_out, 1))
Example #7
0
 def connect_to(self, prev_layer):
     self.w = self.init_func((self.n_out, prev_layer.n_out), prev_layer.n_out, self.n_out)
     self.b = f.zero((self.n_out, 1))