A Software Engineer
Portfolio: https://ohatakenji.github.io/portfolio/
AtCoder: https://atcoder.jp/users/Ohata_Kenji
SketchRNN : a seq2seq VAE model which draws pictures
Home Page: https://arxiv.org/abs/1704.03477
A Software Engineer
Portfolio: https://ohatakenji.github.io/portfolio/
AtCoder: https://atcoder.jp/users/Ohata_Kenji
Hi I was trying to run your code exactly while just changing the dataset to cat.npz that I downloaded from google cloud (https://console.cloud.google.com/storage/browser/quickdraw_dataset/full/numpy_bitmap;tab=objects?pli=1&prefix=&forceOnObjectsSortingFiltering=false).
import torch
# from dataset import To5vStrokes, V5Dataset
# from model import SketchRNN
# from trainer import Trainer
from pathlib import Path
from torch.utils.tensorboard import SummaryWriter
data_path = Path.home() / 'Desktop/Jupyter_Notebook/cat.npz'
dataset = V5Dataset(str(data_path), To5vStrokes(max_len=200), pre_scaling=True)
dataloader = torch.utils.data.DataLoader(
dataset, batch_size=100, shuffle=True)
log_dir = Path.home() / 'Desktop/Jupyter_Notebook'
tb_writer = SummaryWriter(log_dir)
checkpoint_dir = Path.home() / 'Desktop/Jupyter_Notebook'
model = SketchRNN(enc_hidden_size=256, dec_hidden_size=512,
Nz=128, M=20, dropout=0.1)
trainer = Trainer(model, dataloader, tb_writer,
checkpoint_dir, learning_rate=0.0001)
trainer.train(epoch=300000)
tb_writer.close()
So I basically changed data_path, log_dir, and checkpoint_dir.
Then I have this error,
ValueError Traceback (most recent call last)
<ipython-input-14-b4a8b96ebdc7> in <module>
7
8 data_path = Path.home() / 'Desktop/Jupyter_Notebook/cat.npz'
----> 9 dataset = V5Dataset(str(data_path), To5vStrokes(max_len=200), pre_scaling=True)
10 dataloader = torch.utils.data.DataLoader(
11 dataset, batch_size=100, shuffle=True)
<ipython-input-6-fbe5ea2c671c> in __init__(self, data_path, transform, pre_scaling)
29 self.transform = transform
30 self.data = np.load(data_path, encoding='bytes', allow_pickle=True)
---> 31 scale = self.scaling_factor()
32 self.data = np.array(list(
33 map(lambda x: self.scale_stroke(x, scale), self.data)))
<ipython-input-6-fbe5ea2c671c> in scaling_factor(self)
42
43 def scaling_factor(self):
---> 44 data = np.concatenate([S for S in self.data])
45 return np.std(data[:, 0:2])
46
<__array_function__ internals> in concatenate(*args, **kwargs)
ValueError: zero-dimensional arrays cannot be concatenated
Would you mind if you help me out with this please?
Nice repository, thank you.
Could you please indicate how many epochs of training did it take to generate that apple from readme
?
In the main branch test.py
I see 300,000 epochs, exp1.py
uses 3,000, test.py
in experimental branch uses 300.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.