Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

delete torch.nn.functional #164

Merged
merged 2 commits into from
Feb 2, 2023
Merged

delete torch.nn.functional #164

merged 2 commits into from
Feb 2, 2023

Conversation

cjfghk5697
Copy link
Contributor

@cjfghk5697 cjfghk5697 commented Jan 16, 2023

I find useless import in Latent diffusion model
Therefore, I delete import torch.nn.functional.

Before :

import torch
import torch.nn as nn
import torch.nn.functional

After :

import torch
import torch.nn as nn

Additionally, I find more unnecessary import in the unet.py. I delete and replace code.
import torch
import torch as th #This code have used one time. 
x = th.cat([x, x_input_block.pop()], dim=1)
x = torch.cat([x, x_input_block.pop()], dim=1) #Therefore, I delete the code, and replcae th.cat -> torch.cat.

@vpj vpj merged commit bdaa667 into labmlai:master Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants