cost 116 ms
如何使用 python 將 SD WebUI 中的 LORA 應用到 DreamShaper

[英]How to apply LORAs like in SD WebUI to DreamShaper using python

我一直在使用穩定的擴散 WebUI 為我的應用程序嘗試不同的模型和 LORA。 我現在正在嘗試做與我在 WebUI 中所做的相同的事情,但是在 Python 中。我有一個用於 DreamShaper v5 beta-2 的安全張量文件,其中包含 VAE。我正在為我下載的兩個 LORA 使用另外兩個 ...

Pytorch 2.0.1+cu118 不適用於 Cuda 12.1

[英]Pytorch 2.0.1+cu118 is not working with Cuda 12.1

我的電腦安裝了CUDA 12.1,安裝了Pytorch 2.0.1+cu118。 我正在嘗試安裝CLIP-FIELDS 。 當我安裝gridencoder“python setup.py install”時,出現以下錯誤: 我在官方pytorch論壇https://discuss.pytorch. ...

如何打印 model yolov5 model 的總結

[英]how to print model summary of yolov5 model

a.pt文件如何打印yolov5 model的model摘要?# Model model = torch.hub.load('ultralytics/yolov5', 'yolov5s', device='cpu') from torchstat import stat #try 1 stat( ...

Pytorch 張量錯誤:ValueError:預期輸入 batch_size (1) 以匹配目標 batch_size (2)

[英]Pytorch Tensor Error: ValueError: Expected input batch_size (1) to match target batch_size (2)

我目前正在為剪刀石頭布程序創建卷積神經網絡,但出現以下錯誤:ValueError:預期輸入 batch_size (1) 與目標 batch_size (2) 匹配。 當我打印“目標”的大小時,我得到 torch.size([1,0]) 並且“輸入”的大小是 torch.Size([1, 3, 1 ...

如何將pytorch數據集帶入pandas dataframe

[英]How to bring pytorch datasets into pandas dataframe

我看過很多關於如何將 pandas 數據轉換為 pytorch 數據集的代碼。 但是,我還沒有找到或無法弄清楚相反的做法。 ie Load pytorch dataset into pandas dataframe。我想把AG新聞加載到pandas。你能幫忙嗎? 謝謝。 from torchte ...

計算“torch.tensor”中條目之間的成對距離

[英]Calculating pairwise distances between entries in a `torch.tensor`

我正在嘗試實施 此處所示的流形 alignment 類型的損失。 給定張量embs 形狀(256,64)是 a.network 生成的一批嵌入,我想計算行條目之間的所有成對距離。 我試過torch.nn.PairwiseDistance但我不清楚它是否對我正在尋找的東西有用。 ...

2023-02-01 10:47:38   1   22    pytorch  
CUDA批出memory

[英]CUDA batch out of memory

我有一個小數據集並運行一個名為 LightXML 的腳本,該腳本位於 git 上: https://github.com/kongds/LightXML 我收到此錯誤: 我發現有多個帖子說我應該減少批量大小,但我似乎找不到它的定義。 腳本停止在: one_epoch 方法如下,腳本停滯在outp ...

gpu 部分檢測到,火炬張量未上傳到 gpu

[英]gpu partially detected, torch tensor is not uploaded to gpu

檢測到我的 gpu 但不在 我使用的代碼是: 結果是: 我使用的是 NVIDIA GTX 1070 Ti,Nvidia 顯卡驅動 460.89、cuda 11.2、cudnn 8.1.1、torch 1.7.1+cu110、torchvision 0.8.2+cu110。 雖然上面的結果,我的深度 ...

錯誤:mat1 和 mat2 形狀不能相乘(1000x10 和 1x1)

[英]Error: mat1 and mat2 shapes cannot be multiplied (1000x10 and 1x1)

我正在嘗試在 pytorch 中實現嶺回歸,定義損失 function 並在不同的迭代中繪制 function。 唯一的問題是,我不斷收到錯誤代碼:mat1 和 mat2 形狀無法相乘(1000x10 和 1x1)。 我想將第二個矩陣轉換為 1x10 以完成代碼,但我似乎無法讓它工作。 我嘗試更改 ...

CUDA 問題。 我認為 GPU 可能檢測不到

[英]CUDA problem. I think GPU might not be detected

我嘗試安裝這個: https://github.com/bycloudai/CVPR2022-DaGAN-Window 並使用 有一點問題。 當我嘗試在 ANACONDA (conda) 中運行下一個命令時出現的錯誤: 錯誤: 我應該怎么辦? 我有帶有 RTX 2060 SETUP 的 CUDA 工 ...

如何在訓練循環中訪問中間輸出的梯度?

[英]How to access the gradients of intermediate outputs during the training loop?

假設我有以下(相對)小的 lstm model: 首先,讓我們創建一些偽輸入/目標數據: 現在,讓我們定義一個簡單的 lstm model: 實例化 model,失去樂趣。 和優化器: 現在,在訓練循環期間,我想打印每個時期的中間( a_s.grad , b_s.grad )輸出的梯度: 但我得到 ...

Pytorch:有沒有辦法在使用調度程序時實現逐層學習率衰減?

[英]Pytorch: Is there a way to implement layer-wise learning rate decay when using a Scheduler?

我想在仍然使用調度程序的同時實現逐層學習率衰減。 具體來說,我目前擁有的是:model = Model() optim = optim.Adam(lr=0.1) scheduler = optim.lr_scheduler.OneCycleLR(optim, max_lr=0.1) 然后,學習率 ...

如何遍歷 Pytorch 中未知形狀的整個張量?

[英]How can I iterate through the entire tensor of an unknown shape in Pytorch?

假設我有一個任意的 NN.module。 我想遍歷這個 neural.network 的所有可學習權重,然后修改每個權重。 例如我想做這樣的事情(其中 model 是 Re.net50): 但是,我想在不知道參數尺寸的情況下對所有權重執行此操作。 無論如何要這樣做還是我需要做一些遞歸? ...

2023-01-31 01:20:06   1   30    pytorch  
將一個張量的值添加到另一個而不影響圖形

[英]Add values of one tensor to another without affecting the graph

我只是想將tensor2的第三維的前三個值添加到tensor1,而不影響反向傳播時的圖形。 Tensor2 只需要它的值,它不應該是圖表的一部分。 這行得通嗎? 這就是我在 numpy 中的做法。 我應該更好地使用 torch.add() 還是 use.data? 我對何時使用什么感到困惑。 謝謝 ...

Python 中的多處理 freeze_support() 錯誤

[英]Multiprocessing freeze_support() error in Python

我是深度學習概念的新手,到目前為止一直在使用 google colab 來運行深度學習模型。 當我對 pycharm 進行同樣的嘗試時,出現了這個錯誤。 Project_name=model,file_name=model.py 我沒有任何主要方法,直接運行model.py,這是否合法?idk 錯 ...

是否有 PyTorch 的模型(輸入)像 TensorFlow 的 model.predict(輸入)?

[英]Is there linter for model(inputs) of PyTorch like model.predict(inputs) of TensorFlow?

我的目標是做 object 檢測。 然而,YOLOv7 和(使用特征圖創建邊界框的技巧)教程使用的是 PyTorch。 問題是: model(inputs)沒有類型。 代碼L148-L150 這迫使我調試helper.py文件以了解[0]和out[1]是什么。 目前,我假設out[0]作為 so ...

Pytorch - nn.CrossEntropyLoss

[英]Pytorch - nn.CrossEntropyLoss

我想申請 nn.CrossEntropyLoss 在這種情況下, 我能解決這個問題嗎? 但如果批量大小為 2 output.shape 是 2,30,7 和 label.shape 是 2, 30 如何應用loss = criterion(outputs, targets) ...


 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM