用pytorch 實現邏輯迴歸

用pytorch 實現邏輯迴歸 構造數據集: n_data = torch.ones(100, 2) x0 = torch.normal(2 * n_data, 1) # 生成均值爲2.標準差爲1的隨機數組成的矩陣 shape=(100, 2) y0 = torch.zeros(100) x1 = torch.normal(-2 * n_data, 1) # 生成均值爲-2.標準差爲1的隨機數
相關文章
相關標籤/搜索