Comments (4)
Hi,
Can you please provide a minimal example to reproduce the error?
Thx
from complexpytorch.
class ComplexNet_Unet(nn.Module):
def __init__(self):
super(ComplexNet_Unet, self).__init__()
self.conv1 = ComplexConv2d(1, 8, 5, 2, 2)
self.conv2= ConvTranspose2d(8, 1, 1,1)
def forward(self,x):
x = self.conv1(x)
x = self.conv2(x)
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
model = ComplexNet_Unet().to(device)
optimizer = torch.optim.SGD(model.parameters(), lr=0.01, momentum=0.9)
loss = nn.L1Loss()
def train(model, device, data,target, optimizer, epochs):
model.train()
for epoch in range(epochs):
#data = torch.complex(torch.DoubleTensor(np.real(X)),torch.DoubleTensor(np.imag(X)))
#target = torch.complex(torch.DoubleTensor(np.real(y)),torch.DoubleTensor(np.imag(y)))
#data, target = data2.to(device).type(torch.complex64), target2.to(device)
optimizer.zero_grad()
output = model(data)
print(output.shape)
value = loss(output, target)
print(value)
value.backward()
optimizer.step()
if batch_idx % 100 == 0:
print('Train Epoch: {:3} [{:6}/{:6} ({:3.0f}%)]\tLoss: {:.6f}'.format(
epoch,
batch_idx * len(data),
len(train_loader.dataset),
100. * batch_idx / len(train_loader),
loss.item())
)
Run training on 50 epochs
for epoch in range(1):
train(model, device, data, target, optimizer, 500)
from complexpytorch.
That is not so minimal...
from complexpytorch.
Before testing anything, I see that you use the native ConvTranspose2d
instead of the complex counterpart ComplexConvTranspose2d
from complexPyTorch. Is that on purpose?
from complexpytorch.
Related Issues (20)
- can not compute in parallel HOT 3
- RuntimeError: imag is not implemented for tensors with non-complex dtypes. HOT 1
- How to feed the input of two dimensions to the model HOT 3
- A bug in ComplexBatchNorm1d HOT 1
- Error with forward propagation with ComplexBatchNorm1d HOT 4
- Use native Pytorch operations for complex numbers HOT 2
- ComplexBatchNorm1d Error HOT 3
- About operating efficiency and convergence HOT 2
- dropout need to set mask's device same as input Tensor! HOT 5
- ComplexConvTransposeNd
- Complex MSELoss
- Configuration for each channel
- Getting Error while Importing Tanh, Sigmoid
- ComplexDropout2d Device Error
- torchinfo.summary() is not able to executable HOT 2
- How to ensure that the output of a convolutional or BN layer meets Crelu's input requirements HOT 1
- Another batch norm suggestion
- Autograd and backpropagation
- ComplexPReLU Bug
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from complexpytorch.