Skip to main content

Pytorch supporter

Project description

pytorch-supporter

https://pypi.org/project/pytorch-supporter

pip install pytorch-supporter

Supported layers

import pytorch_supporter

pytorch_supporter.layers.DictToParameters
pytorch_supporter.layers.DotProduct
pytorch_supporter.layers.GRULastHiddenState
pytorch_supporter.layers.HiddenStateResetGRU
pytorch_supporter.layers.HiddenStateResetLSTM
pytorch_supporter.layers.HiddenStateResetRNN
pytorch_supporter.layers.LazilyInitializedLinear
pytorch_supporter.layers.LSTMLastHiddenState
pytorch_supporter.layers.Reshape
pytorch_supporter.layers.RNNLastHiddenState
pytorch_supporter.layers.SelectFromArray

Supported utils

import pytorch_supporter

text = ''
pytorch_supporter.utils.clean_english(text)
pytorch_supporter.utils.clean_korean(text)

Simple time series regression

import pytorch_supporter

from sklearn.preprocessing import MinMaxScaler
transformer = MinMaxScaler()
transformer.fit(train_df[['Close']].to_numpy())
train_np_array = transformer.transform(validation_df[['Close']].to_numpy())
#window_length = sequence_length + 1
train_x, train_label = pytorch_supporter.utils.slice_time_series_data_from_np_array(train_np_array, x_column_indexes=[0], label_column_indexes=[0], sequence_length=7)
#print(train_x.shape) #(973, 7, 1)
#print(train_labels.shape) #(973, 1)
#print(validation_x.shape) #(238, 7, 1)
#print(validation_labels.shape) #(238, 1)

Multiple time series regression

import pytorch_supporter

from sklearn.preprocessing import MinMaxScaler
transformer = MinMaxScaler()
transformer.fit(train_df[['Open', 'High', 'Low', 'Close', 'Adj Close', 'Volume']].to_numpy())
train_np_array = transformer.transform(validation_df[['Open', 'High', 'Low', 'Close', 'Adj Close', 'Volume']].to_numpy())
#window_length = sequence_length + 1
train_x, train_label = pytorch_supporter.utils.slice_time_series_data_from_np_array(train_np_array, x_column_indexes=[0, 1, 2, 3, 4, 5], label_column_indexes=[3], sequence_length=7)
#print(train_x.shape) #(973, 7, 6)
#print(train_labels.shape) #(973, 1)
#print(validation_x.shape) #(238, 7, 6)
#print(validation_labels.shape) #(238, 1)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytorch-supporter-0.0.19.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

pytorch_supporter-0.0.19-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file pytorch-supporter-0.0.19.tar.gz.

File metadata

  • Download URL: pytorch-supporter-0.0.19.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for pytorch-supporter-0.0.19.tar.gz
Algorithm Hash digest
SHA256 49ea3e489d9202b6b2f81f90b94e4feac1a884afa9546e43133cb90481cf0555
MD5 9aae20f15dbb3d8435c95b6c17235da1
BLAKE2b-256 8337fa3d5d7e71ffa84fceeb5fe60c8799c515cc8e41c86a2e15d8f9afda9d16

See more details on using hashes here.

File details

Details for the file pytorch_supporter-0.0.19-py3-none-any.whl.

File metadata

File hashes

Hashes for pytorch_supporter-0.0.19-py3-none-any.whl
Algorithm Hash digest
SHA256 b6936891c6046541b55add13547e2e1325adc981fab8b70b073cc75106fd41ec
MD5 925dc677532aeb8d0a0a0fbba6c17891
BLAKE2b-256 f995dccb70d3aa1bab7e82cf5cb7024fff9c452ce876b334b6f02d710c5b3961

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page