m607stars / multiimagesteganography Goto Github PK
View Code? Open in Web Editor NEWPytorch Implementation of the paper: Multi-Image Steganography Using Deep Neural Networks by Abhishek et. al.
Pytorch Implementation of the paper: Multi-Image Steganography Using Deep Neural Networks by Abhishek et. al.
Hi ,
I liked your work on MultiImagesteganography and I need your help to resolve a error which encountered while I am executing the code
I am getting a Type error while executing the below code of yours
I am also attaching a image please check and help me out.
#1
def train(model,epochs,decoder_criterion,full_model_optimizer,full_model_criterion,learning_rate,training_iterator,valid_iterator,print_every=50):
training_full_model_loss_list = []
decoder_loss_list = []
valid_loss_list = []
for epoch in range(epochs):
for index,training_dict in enumerate(training_iterator):
cover_image = training_dict['cover_image']
cover_image = cover_image.to(device)
secret_image_1 = training_dict['secret_image_1']
secret_image_1 = secret_image_1.to(device)
secret_image_2 = training_dict['secret_image_2']
secret_image_2 = secret_image_2.to(device)
secret_image_3 = training_dict['secret_image_3']
secret_image_3 = secret_image_3.to(device)
full_model_optimizer.zero_grad()
encoder_output = model(cover_image,secret_image_1,secret_image_2,secret_image_3,secret_image_3,'encoder')
hidden_image,reveal_image_1,reveal_image_2,reveal_image_3 = model(cover_image,
secret_image_1,
secret_image_2,
secret_image_3,secret_image_3,'full')
full_model_loss = full_model_criterion(hidden_image,cover_image,
reveal_image_1,secret_image_1,
reveal_image_2,secret_image_2,
reveal_image_3,secret_image_3,
)
full_model_loss.backward()
full_model_optimizer.step()
full_model_optimizer.zero_grad()
reveal_output1, reveal_output2,reveal_output3 = model(cover_image,
secret_image_1,
secret_image_2,
secret_image_3,encoder_output,'decoder')
decoder_loss = decoder_criterion(reveal_output1, reveal_output2,reveal_output3,secret_image_1,
secret_image_2,secret_image_3)
decoder_loss.backward()
full_model_optimizer.step()
training_full_model_loss_list.append(full_model_loss)
decoder_loss_list.append(decoder_loss)
if epoch % print_every == 0:
print("Training full model loss at {} epochs is: {}".format(epoch, full_model_loss))
print("Training decoder loss at {} epochs is: {}".format(epoch, decoder_loss))
return model, training_full_model_loss_list,decoder_loss_list
#2
model, training_full_model_loss_list,decoder_loss_list = train(model,EPOCHS,decoder_criterion,full_model_optimizer,full_model_criterion,LEARNING_RATE,train_data_loader,valid_data_loader,50)
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.