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

Updates for Python3 #1

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Updates for Python3 #1

wants to merge 10 commits into from

Conversation

rggs
Copy link

@rggs rggs commented Jun 30, 2020

I've updated the files necessary to use python3 and the newer versions of Pytorch, at least with the MNIST dataset and the cluster_greyscale_twohead script.

@PHOSPHENES8
Copy link

Hi,thank you for your great job!
I am stuck to a problem that when I run the cluster task, the command I use is as follows:
python -m code.scripts.cluster.cluster_greyscale_twohead --model_ind 685 --arch ClusterNet6cTwoHead --mode IID --dataset MNIST --dataset_root /datasets/MNIST --gt_k 10 --output_k_A 50 --output_k_B 10 --lamb_A 1.0 --lamb_B 1.0 --lr 0.0001 --num_epochs 3200 --batch_sz 700 --num_dataloaders 5 --num_sub_heads 5 --crop_orig --crop_other --tf1_crop centre_half --tf2_crop random --tf1_crop_sz 20 --tf2_crop_szs 16 20 24 --input_sz 24 --rot_val 25 --no_flip --head_B_epochs 2 > out/sh10_gpu3_m685.out &
However, I got the issue report as :
Traceback (most recent call last): File "D:\Anaconda3\envs\tf2\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "D:\Anaconda3\envs\tf2\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\kunkun\Desktop\IIC\code\scripts\cluster\cluster_greyscale_twohead.py", line 498, in <module> train() File "C:\Users\kunkun\Desktop\IIC\code\scripts\cluster\cluster_greyscale_twohead.py", line 381, in train avg_loss_batch.backward() File "D:\Anaconda3\envs\tf2\lib\site-packages\torch\tensor.py", line 221, in backward torch.autograd.backward(self, gradient, retain_graph, create_graph) File "D:\Anaconda3\envs\tf2\lib\site-packages\torch\autograd\__init__.py", line 132, in backward allow_unreachable=True) # allow_unreachable flag RuntimeError: unsupported operation: more than one element of the written-to tensor refers to a single memory location. Please clone() the tensor before performing the operation.

I am sincerely looking forward to your reply. Hope everything goes well! @rggs @sebastiani

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