Day16 职训(机器学习与资料分析工程师培训班): MVC & MTV架构

上午: AIoT资料分析应用系统框架设计与实作

今天教学一些Django的一些格式用法,及MTV架构代表对应的python档案

from django.db import models
from django.db.models.base import Model

# Create your models here.
class registration_info(models.Model):
    uid = models.CharField(max_length=20, unique=True, verbose_name='使用者名称')
    pwd = models.CharField(max_length=256)
    email = models.EmailField()
    signup_time = models.DateTimeField(auto_now_add=True)
    last_login = models.DateTimeField(auto_now=True)
    id_no = models.CharField(max_length=10)
    cellphone = models.CharField(max_length=10)
    address = models.TextField()
    webpage = models.URLField()
    dept = models.CharField(max_length=100)
    st = models.BooleanField()

    def __str__(self):
        return self.email

下午: Pytorch与深度学习初探

今日延续上次内容,推演梯度下降法的数学公式,也教了一些pytorch的语法

## python native type to torch.tensor 资料格式转换
a=3.0
print(type(a))
a=torch.tensor(a)
print(type(a))
a=a.item()
print(type(a))

## python numpy to torch.tensor 资料格式转换
print("============np array===")
a=np.array([2,2])
print(type(a))

a=torch.from_numpy(a)
print(type(a))
a=a.numpy()
print(type(a))
import numpy as np
import torch
import torch.nn as nn
import matplotlib.pyplot as plt
import numpy as np


### step 1 load data and plot #############

torch.manual_seed(2)
X=torch.randn(100,1)*10
Y= X+torch.randn(100,1)*3
plt.scatter(X,Y)
xm=np.array([-30,30])
w=2
b=10
ym=w*xm+b
plt.plot(xm,ym,'r')


<<:  machine learning : 使用permutation importance继续优化Titantic模型

>>:  tensorflow.python.framework.errors_impl.InternalError: Cannot dlopen all CUDA libraries.

[Day29] swift & kotlin 上架篇!(3) 双平台 上架比较

上架费用 首先来谈谈费用 Apple 99USD/年 有个人帐号可选择 还有公司与政府帐号 分别有不...

[Day04] 空降主管的战地生存术

在一场由执行长主持的月会上,HR 念了一个同事提出的疑问:「公司对工程师的面试标准这麽高,却对管理职...

[第06天]理财达人Mx. Ada-下单作业

前言 本文说明如何进行下单作业。 程序实作 # 设定交易标的 # 以台股上市股票:长荣 contra...

[DAY19]旋转木马(02)

Column object for carousel thumbnailImageUrl Strin...

JS 作用域 DAY47

JS 语法(静态)作用域(Lexical scope) //语法作用域 function callN...