Skip to content

Commit

Permalink
Corrected import order
Browse files Browse the repository at this point in the history
  • Loading branch information
apoorvkh committed May 13, 2022
1 parent b3d31fc commit 4100f6c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions transfer_experiments/predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@

import torch
import torch.nn as nn
import clip

# https://github.com/PyTorchLightning/pytorch-lightning/issues/11663
import sentencepiece; from pytorch_lightning.utilities import AttributeDict
import sentencepiece; import pytorch_lightning as pl; import clip

from transfer_experiments.train import LinearClassifier
from aokvqa_utils import load_aokvqa, map_to_choices
Expand Down Expand Up @@ -54,7 +53,7 @@
hp = classifier.hparams
elif args.clip_zero_shot:
classifier = nn.Identity().to(device)
hp = AttributeDict(backbone='clip', clip_model_type=args.clip_model_type, objective='zero-shot', inputs=args.inputs)
hp = pl.utilities.AttributeDict(backbone='clip', clip_model_type=args.clip_model_type, objective='zero-shot', inputs=args.inputs)

# Load input features

Expand Down

0 comments on commit 4100f6c

Please sign in to comment.